Page 1 of 1

Reporting scripts

Posted: Fri Jun 12, 2009 3:27 pm
by george
This may not be the right spot to post this, but it seemed to be the best fit, (mods feel free to move this post if you feel it would fit better somewhere else).


I am currently evaluating OpenVPN for the company I work for, and so far it is a really great solution. There is one piece that is missing that I am sure upper management will want to see is reports. Reports on usage, reports on user logins, (this is similar to useage I know), connection established times and connection end times for individual users. I see most of this info in the openvpn log except for user connection end times.

Is anyone aware of some exsisting code that will handle this?
Are there any suggestions on how to script this?
Can anyone tell me what verb level will log the user connction end times?

Thanks

Re: Reporting scripts

Posted: Sun Jun 14, 2009 1:16 am
by krzee
you arent looking for a change in verb, try a client-disconnect script
you should be able to get info con connect from client-connect and client-disconnect
goodluck to ya =]

Re: Reporting scripts

Posted: Wed Jun 17, 2009 2:33 pm
by rmull
Another option would be to take the differences in the timestamps between when clients connect and disconnect with a log watcher.

Re: Reporting scripts

Posted: Mon Jan 04, 2010 2:22 pm
by ecrist
Your best bet is to simply parse the log file for openvpn. This is how utilities such as awstats works to get web statistics.

The alternative is as rmull suggested and use a script that's executed on client connect/disconnect and log to mysql or another back end.

Re: Reporting scripts

Posted: Mon Jan 11, 2010 3:12 pm
by george
We are parsing openvpn-status.log, with an in house program, (vmon) that creates entries in a mysql DB, and using an in-house program, (vrpt), that polls the database and reports connection info, either current of in the past. Works quite well, credit goes to our dev team.

Re: Reporting scripts

Posted: Wed Jan 27, 2010 8:18 am
by krzee
have you considered sharing these scripts for the next guy?

Re: Reporting scripts

Posted: Wed Jan 27, 2010 1:55 pm
by george
I would like to but I did not develop them. I will get in touch with the person that did and see if he can post them here.

Re: Reporting scripts

Posted: Wed Jan 27, 2010 4:40 pm
by Douglas
george wrote:I would like to but I did not develop them. I will get in touch with the person that did and see if he can post them here.
Please do! :-)