aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/snmp.php
diff options
context:
space:
mode:
authorPim van den Berg2013-06-26 22:37:38 +0200
committerPim van den Berg2013-06-26 22:40:51 +0200
commitcc28f86006fe8e963a4ea46a65b7035d464b1cd0 (patch)
tree1a1c6458e1291f3ba1d2bbd697976ac8e5aec7f9 /plugin/snmp.php
parentadd viewport meta tag for better experience on mobile devices (diff)
downloadapt-panopticon_cgp-cc28f86006fe8e963a4ea46a65b7035d464b1cd0.zip
apt-panopticon_cgp-cc28f86006fe8e963a4ea46a65b7035d464b1cd0.tar.gz
apt-panopticon_cgp-cc28f86006fe8e963a4ea46a65b7035d464b1cd0.tar.bz2
apt-panopticon_cgp-cc28f86006fe8e963a4ea46a65b7035d464b1cd0.tar.xz
plugin/snmp: add missing instantiation of Type_GenericIO class
This bug was introduced in commit: v0.3-64-gb5f789c [plugin/snmp: add support for if_octets]
Diffstat (limited to '')
-rw-r--r--plugin/snmp.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/snmp.php b/plugin/snmp.php
index 4650dd9..0cbb32a 100644
--- a/plugin/snmp.php
+++ b/plugin/snmp.php
@@ -3,12 +3,13 @@
3# Collectd snmp plugin 3# Collectd snmp plugin
4 4
5require_once 'conf/common.inc.php'; 5require_once 'conf/common.inc.php';
6require_once 'type/Default.class.php';
7require_once 'inc/collectd.inc.php'; 6require_once 'inc/collectd.inc.php';
8 7
9 8
10switch(GET('t')) { 9switch(GET('t')) {
11 case 'if_octets': 10 case 'if_octets':
11 require_once 'type/GenericIO.class.php';
12 $obj = new Type_GenericIO($CONFIG);
12 $obj->data_sources = array('rx', 'tx'); 13 $obj->data_sources = array('rx', 'tx');
13 $obj->ds_names = array( 14 $obj->ds_names = array(
14 'rx' => 'Receive', 15 'rx' => 'Receive',
@@ -23,6 +24,7 @@ switch(GET('t')) {
23 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; 24 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1;
24 break; 25 break;
25 default: 26 default:
27 require_once 'type/Default.class.php';
26 $obj = new Type_Default($CONFIG); 28 $obj = new Type_Default($CONFIG);
27 $obj->rrd_title = sprintf('SNMP: %s (%s)', $obj->args['type'], $obj->args['tinstance']); 29 $obj->rrd_title = sprintf('SNMP: %s (%s)', $obj->args['type'], $obj->args['tinstance']);
28 return; 30 return;