aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/snmp.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugin/snmp.php b/plugin/snmp.php
new file mode 100644
index 0000000..8f3260d
--- /dev/null
+++ b/plugin/snmp.php
@@ -0,0 +1,19 @@
1<?php
2
3# Collectd snmp plugin
4
5require_once 'conf/common.inc.php';
6require_once 'type/Default.class.php';
7require_once 'inc/collectd.inc.php';
8
9
10$obj = new Type_Default($CONFIG);
11$obj->width = $width;
12$obj->heigth = $heigth;
13
14$obj->rrd_title = sprintf('SNMP: %s (%s)', $obj->args['type'], $obj->args['tinstance']);
15$obj->rrd_format = '%5.1lf%s';
16
17collectd_flush($obj->identifiers);
18$obj->rrd_graph();
19