Skip to content

Commit

Permalink
plugin/snmp: add missing instantiation of Type_GenericIO class
Browse files Browse the repository at this point in the history
This bug was introduced in commit:
v0.3-64-gb5f789c [plugin/snmp: add support for if_octets]
  • Loading branch information
pommi committed Jun 26, 2013
1 parent 06b11a6 commit cc28f86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/snmp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -23,6 +24,7 @@
$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;
Expand Down

0 comments on commit cc28f86

Please sign in to comment.