Is there a way to log how long a user is logged onto a pptp (vpn) connection and have that written to a file or sent to an email?
you could setup logging for ‘account,pptp’ topics and choose email delivery, however you might get a lot of emails. Better would be to grep it from syslog and email just the pieces you want.
Sam
sorry kinda new to this, so how would I go about scripting it?
this is just an example, I wouldnt do it this way because way too many emails would come… but you asked for it : )
Winbox
Go to System → Logging
Actions tab
add an action for email and set the email address
then click the rules tab
add a rule that has topics account and pptp with action = email
then use terminal / CLI to check this:
/tool e-mail
set server and from address.
Sam
how about grepping from the syslog