diff options
Diffstat (limited to '')
-rw-r--r-- | plugin/snmp.php | 4 |
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 | ||
5 | require_once 'conf/common.inc.php'; | 5 | require_once 'conf/common.inc.php'; |
6 | require_once 'type/Default.class.php'; | ||
7 | require_once 'inc/collectd.inc.php'; | 6 | require_once 'inc/collectd.inc.php'; |
8 | 7 | ||
9 | 8 | ||
10 | switch(GET('t')) { | 9 | switch(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; |