diff options
author | Pim van den Berg | 2012-08-12 16:53:00 +0200 |
---|---|---|
committer | Pim van den Berg | 2012-08-12 16:53:00 +0200 |
commit | 48e46c1ea23b8188053b98196f9f3a627e9e0afb (patch) | |
tree | fcbb86847d3badeff110230179dc81b6bb102489 /plugin | |
parent | plugin: convert spaces to tabs (diff) | |
download | apt-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.php | 19 |
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 | |||
5 | require_once 'conf/common.inc.php'; | ||
6 | require_once 'type/Default.class.php'; | ||
7 | require_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 | |||
17 | collectd_flush($obj->identifiers); | ||
18 | $obj->rrd_graph(); | ||
19 | |||