From 21cf80f378898265e239c3c444699669d71a0b36 Mon Sep 17 00:00:00 2001 From: Conrad Kostecki Date: Sun, 16 Jun 2013 16:09:03 +0200 Subject: plugin: add openvpn plugin Source: http://pastebin.com/5vNDuKaZ --- plugin/openvpn.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 plugin/openvpn.php (limited to 'plugin/openvpn.php') diff --git a/plugin/openvpn.php b/plugin/openvpn.php new file mode 100644 index 0000000..c146f10 --- /dev/null +++ b/plugin/openvpn.php @@ -0,0 +1,42 @@ +ds_names = array( + 'rx' => 'Receive', + 'tx' => 'Transmit', + ); + $obj->colors = array( + 'rx' => '0000ff', + 'tx' => '00b000', + ); + $obj->rrd_title = sprintf('Traffic (%s)', $obj->args['pinstance']); + $obj->rrd_vertical = '%s per second'; + $obj->rrd_format = '%5.1lf%s'; + break; + case 'users': + require_once 'type/Default.class.php'; + $obj = new Type_Default($CONFIG); + $obj->ds_names = array( + 'value' => 'Users', + ); + $obj->rrd_title = sprintf('Users (%s)', $obj->args['pinstance']); + $obj->rrd_vertical = 'Users'; + $obj->rrd_format = '%.1lf'; + break; +} + +collectd_flush($obj->identifiers); +$obj->rrd_graph(); -- cgit v1.1