Merge branch 'ent-3598-cambio-en-plugin-dynamic-snmp' into 'develop'

minor updates in plugintools

See merge request artica/pandorafms!2211

Former-commit-id: 30806fc6b073af4607cb4cdf1c3222d930a66d58
This commit is contained in:
Daniel Rodriguez 2019-03-15 14:07:31 +01:00
commit eac346daf4
1 changed files with 12 additions and 0 deletions

View File

@ -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} )