Reporting scripts
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.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- Forum Team
- Posts: 117
- Joined: Tue Jun 09, 2009 4:25 pm
- Location: St. Louis, MO USA
Reporting scripts
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
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
- krzee
- Forum Team
- Posts: 728
- Joined: Fri Aug 29, 2008 5:42 pm
Re: Reporting scripts
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 =]
you should be able to get info con connect from client-connect and client-disconnect
goodluck to ya =]
- rmull
- OpenVpn Newbie
- Posts: 1
- Joined: Wed Aug 27, 2008 2:27 am
- Contact:
Re: Reporting scripts
Another option would be to take the differences in the timestamps between when clients connect and disconnect with a log watcher.
- ecrist
- Forum Team
- Posts: 237
- Joined: Wed Nov 26, 2008 10:33 pm
- Location: Northern Minnesota, USA
- Contact:
Re: Reporting scripts
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.
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
IRC: #openvpn, #openvpn-devel
Co-Author of Mastering OpenVPN
Author of Troubleshooting OpenVPN
-
- Forum Team
- Posts: 117
- Joined: Tue Jun 09, 2009 4:25 pm
- Location: St. Louis, MO USA
Re: Reporting scripts
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.
- krzee
- Forum Team
- Posts: 728
- Joined: Fri Aug 29, 2008 5:42 pm
Re: Reporting scripts
have you considered sharing these scripts for the next guy?
-
- Forum Team
- Posts: 117
- Joined: Tue Jun 09, 2009 4:25 pm
- Location: St. Louis, MO USA
Re: Reporting scripts
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.
-
- Forum Team
- Posts: 285
- Joined: Wed Aug 27, 2008 2:41 am
Re: Reporting scripts
Please do!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.