From: Florian Forster Date: Tue, 26 Aug 2008 15:57:38 +0000 (+0200) Subject: contrib/snmp-probe-host.px: Fix for `table' data without instance. X-Git-Tag: collectd-4.3.4~5 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=e971fcbed97e6a25fa92c594a15449c77d47ada8 contrib/snmp-probe-host.px: Fix for `table' data without instance. --- diff --git a/contrib/snmp-probe-host.px b/contrib/snmp-probe-host.px index bb9f3299..9130ecec 100755 --- a/contrib/snmp-probe-host.px +++ b/contrib/snmp-probe-host.px @@ -61,10 +61,13 @@ sub probe_one } @oids = split (/"\s*"/, $conf->{'values'}); - if (($conf->{'table'} =~ m/^(true|yes|on)$/i) && ($conf->{'instance'})) + if ($conf->{'table'} =~ m/^(true|yes|on)$/i) { $cmd = 'GETNEXT'; - push (@oids, $conf->{'instance'}); + if (defined ($conf->{'instance'})) + { + push (@oids, $conf->{'instance'}); + } } require Data::Dumper;