Modified snmp_remote.pl

This commit is contained in:
fbsanchez 2018-01-22 15:50:01 +01:00
parent b964758d53
commit b1c70bb580

View File

@ -248,9 +248,11 @@ if ($module eq "process") {
$command_line_parammeters = "-v $version -c $community $host";
}
$status = `snmpwalk $command_line_parammeters 1.3.6.1.2.1.25.4.2.1.2 | grep "$process" | head -1 | wc -l`;
$status = `snmpwalk $command_line_parammeters 1.3.6.1.2.1.25.4.2.1.2 2>/dev/null`;
print $status;
if ($? == 0) {
print (($status =~ m/$process/mi)?1:0);
}
}
#-----------------------------------------------------------------------