From cc28f86006fe8e963a4ea46a65b7035d464b1cd0 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Wed, 26 Jun 2013 22:37:38 +0200 Subject: 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] --- plugin/snmp.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugin/snmp.php') 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 @@ # Collectd snmp plugin require_once 'conf/common.inc.php'; -require_once 'type/Default.class.php'; require_once 'inc/collectd.inc.php'; switch(GET('t')) { case 'if_octets': + require_once 'type/GenericIO.class.php'; + $obj = new Type_GenericIO($CONFIG); $obj->data_sources = array('rx', 'tx'); $obj->ds_names = array( 'rx' => 'Receive', @@ -23,6 +24,7 @@ switch(GET('t')) { $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; break; default: + require_once 'type/Default.class.php'; $obj = new Type_Default($CONFIG); $obj->rrd_title = sprintf('SNMP: %s (%s)', $obj->args['type'], $obj->args['tinstance']); return; -- cgit v1.1