X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=contrib%2Fsnmp-probe-host.px;h=1d8f975b6a6066f41b94e4b18bb96dbf38ceb089;hb=e819179ad6bc82464e5e158aa7b42983829a0aa5;hp=9130ecec4f89f9cb1bab82a0508be7b112665b23;hpb=e971fcbed97e6a25fa92c594a15449c77d47ada8;p=collectd.git diff --git a/contrib/snmp-probe-host.px b/contrib/snmp-probe-host.px index 9130ecec..1d8f975b 100755 --- a/contrib/snmp-probe-host.px +++ b/contrib/snmp-probe-host.px @@ -99,6 +99,14 @@ sub probe_one { return; } + if (!defined ($status)) + { + return; + } + if ("$status" eq 'NOSUCHOBJECT') + { + return; + } } else { @@ -216,11 +224,6 @@ sub probe_all $version--; } # while ($version > 0) - if (!@valid_data) - { - return; - } - print < Address "$address" @@ -231,6 +234,14 @@ EOF { print " Collect \"$_\"\n"; } + if (!@valid_data) + { + print <