[collectd] [PATCH] OpenVPN plugin

Doug MacEachern Doug.MacEachern at hyperic.com
Fri Jan 2 19:48:47 CET 2009


Hi Florian,

> -----Original Message-----
> From: Florian Forster [mailto:octo at verplant.org]
> Sent: Thursday, January 01, 2009 3:35 AM
> To: Doug MacEachern
> Cc: collectd at verplant.org
> Subject: Re: [collectd] [PATCH] OpenVPN plugin
> 
> Hi Doug,
> 
> On Sat, Dec 20, 2008 at 09:24:44PM -0500, Doug MacEachern wrote:
> > Simple but useful module for monitoring per-client openvpn traffic..
> > Any thoughts on having 'make install' populate the include/
> directory?
> > Seems like *.h plus an apxs-like script would be handy for this type
> > of plugin.
> 
> thanks a lot for your plugin :) Unfortunately, my version of OpenVPN
> (2.0.9-4etch1) doesn't print client lists yet :/

Hmm, is that due to version or config?
I thought it has been around since 2004.10.28 -- Version 2.0-beta15:
http://svn.openvpn.net/projects/openvpn/trunk/openvpn/ChangeLog
"Added --status-version option to control format
  of --status file.  The --mode server
  --status-version 2 format now includes a line
  type token, the virtual IP address is shown
  in the client list"

> I changed the header of the .c file to name you as one of the
copyright
> holders, too, and added you to the list of authors.
> 
> Also, I've added an entry to the collectd.conf(5) manual page. Could
> you please double check that I understood everything correctly?
> -- 8< --
>  Plugin "openvpn"
> 
>  The OpenVPN plugin reads a status file maintained by OpenVPN and
gath-
> ers traffic statistics about connected clients.
> 
>  To set up OpenVPN to write to the status file periodically, use the
-
> -status option of OpenVPN. Since OpenVPN can write two different for-
> mats, you need to set the required format, too. This is done by
setting
> --status-version to 2.
> 
>  So, in a nutshell you need:
> 
>    openvpn $OTHER_OPTIONS \
>      --status "/var/run/openvpn-status" 10 \
>      --status-version 2
> 
>  Available options:
> 
>  StatusFile File
>      Specifies the location of the status file.
> -- >8 --

Yes, this is correct.  The options can also be in the
openvpn/server.conf:
status-version 2
status openvpn-status.log

Thanks,
-Doug

> Best regards,
> -octo
> --
> Florian octo Forster
> Hacker in training
> GnuPG: 0x91523C3D
> http://verplant.org/



More information about the collectd mailing list