diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index a2f8b35ee5..b71d9f03a1 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -2018,6 +2018,12 @@ sub snmp_walk { $timeout = $snmp->{timeout}; } + if ($^O =~ /lin/i && "`which snmpwalk`" eq "") { + return { + 'error' => 'snmpwalk not found' + }; + } + $snmp->{extra} = '' unless defined $snmp->{extra}; if ( defined ($snmp->{version} ) @@ -2131,6 +2137,12 @@ sub snmp_get { $timeout = $snmp->{timeout}; } + if ($^O =~ /lin/i && "`which snmpwalk`" eq "") { + return { + 'error' => 'snmpwalk not found' + }; + } + $snmp->{extra} = '' unless defined $snmp->{extra}; if ( defined ($snmp->{version} )