Reporting scripts

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
george
Forum Team
Posts: 117
Joined: Tue Jun 09, 2009 4:25 pm
Location: St. Louis, MO USA

Reporting scripts

Post by george » Fri Jun 12, 2009 3:27 pm

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

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: Reporting scripts

Post by krzee » Sun Jun 14, 2009 1:16 am

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 =]

User avatar
rmull
OpenVpn Newbie
Posts: 1
Joined: Wed Aug 27, 2008 2:27 am
Contact:

Re: Reporting scripts

Post by rmull » Wed Jun 17, 2009 2:33 pm

Another option would be to take the differences in the timestamps between when clients connect and disconnect with a log watcher.

User avatar
ecrist
Forum Team
Posts: 237
Joined: Wed Nov 26, 2008 10:33 pm
Location: Northern Minnesota, USA
Contact:

Re: Reporting scripts

Post by ecrist » Mon Jan 04, 2010 2:22 pm

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.
OpenVPN Community Administrator
IRC: #openvpn, #openvpn-devel
Co-Author of Mastering OpenVPN
Author of Troubleshooting OpenVPN

george
Forum Team
Posts: 117
Joined: Tue Jun 09, 2009 4:25 pm
Location: St. Louis, MO USA

Re: Reporting scripts

Post by george » Mon Jan 11, 2010 3:12 pm

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.

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: Reporting scripts

Post by krzee » Wed Jan 27, 2010 8:18 am

have you considered sharing these scripts for the next guy?

george
Forum Team
Posts: 117
Joined: Tue Jun 09, 2009 4:25 pm
Location: St. Louis, MO USA

Re: Reporting scripts

Post by george » Wed Jan 27, 2010 1:55 pm

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.

Douglas
Forum Team
Posts: 285
Joined: Wed Aug 27, 2008 2:41 am

Re: Reporting scripts

Post by Douglas » Wed Jan 27, 2010 4:40 pm

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! :-)

Post Reply