aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin
diff options
context:
space:
mode:
authorPim van den Berg2012-08-12 16:53:00 +0200
committerPim van den Berg2012-08-12 16:53:00 +0200
commit48e46c1ea23b8188053b98196f9f3a627e9e0afb (patch)
treefcbb86847d3badeff110230179dc81b6bb102489 /plugin
parentplugin: convert spaces to tabs (diff)
downloadapt-panopticon_cgp-48e46c1ea23b8188053b98196f9f3a627e9e0afb.zip
apt-panopticon_cgp-48e46c1ea23b8188053b98196f9f3a627e9e0afb.tar.gz
apt-panopticon_cgp-48e46c1ea23b8188053b98196f9f3a627e9e0afb.tar.bz2
apt-panopticon_cgp-48e46c1ea23b8188053b98196f9f3a627e9e0afb.tar.xz
plugin: add snmp plugin
This is a very basic SNMP plugin.
Diffstat (limited to '')
-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