From 59a4afbbabff9eb7994ad82fef5005c2b1d28624 Mon Sep 17 00:00:00 2001 From: cisse@yahoo.fr Date: Sat, 9 Feb 2013 22:45:35 +0100 Subject: plugin: add iptables/ip6tables plugin Signed-off-by: Manuel CISSÉ --- plugin/ip6tables.php | 32 ++++++++++++++++++++++++++++++++ plugin/iptables.php | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 plugin/ip6tables.php create mode 100644 plugin/iptables.php diff --git a/plugin/ip6tables.php b/plugin/ip6tables.php new file mode 100644 index 0000000..3f6c166 --- /dev/null +++ b/plugin/ip6tables.php @@ -0,0 +1,32 @@ +width = $width; +$obj->heigth = $heigth; + +$obj->data_sources = array('value'); +switch($_GET['t']) { + case 'ipt_bytes': + $obj->rrd_title = 'Bytes'; + break; + case 'ipt_packets': + $obj->rrd_title = 'Packets'; + break; + } +$obj->rrd_vertical = ''; +$obj->rrd_format = '%5.1lf%s'; + +collectd_flush($obj->identifiers); +$obj->rrd_graph(); + +?> diff --git a/plugin/iptables.php b/plugin/iptables.php new file mode 100644 index 0000000..15a183b --- /dev/null +++ b/plugin/iptables.php @@ -0,0 +1,32 @@ +width = $width; +$obj->heigth = $heigth; + +$obj->data_sources = array('value'); +switch($_GET['t']) { + case 'ipt_bytes': + $obj->rrd_title = 'Bytes'; + break; + case 'ipt_packets': + $obj->rrd_title = 'Packets'; + break; + } +$obj->rrd_vertical = ''; +$obj->rrd_format = '%5.1lf%s'; + +collectd_flush($obj->identifiers); +$obj->rrd_graph(); + +?> -- cgit v1.1