mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Modified snmp_remote.pl
This commit is contained in:
parent
b964758d53
commit
b1c70bb580
@ -206,7 +206,7 @@ if ($module eq "diskuse") {
|
|||||||
$command_line_parammeters = "-v $version -c $community $host";
|
$command_line_parammeters = "-v $version -c $community $host";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($disk =~ /\\/) {
|
if ($disk =~ /\\ /) {
|
||||||
$disk =~ s/\\/\\\\/g;
|
$disk =~ s/\\/\\\\/g;
|
||||||
}
|
}
|
||||||
my $diskid = `snmpwalk -r 2 -On $command_line_parammeters .1.3.6.1.2.1.25.2.3.1.3 | grep -F '$disk' | head -1 | gawk '{print \$1}' | gawk -F "." '{print \$13}' | tr -d "\r"`;
|
my $diskid = `snmpwalk -r 2 -On $command_line_parammeters .1.3.6.1.2.1.25.2.3.1.3 | grep -F '$disk' | head -1 | gawk '{print \$1}' | gawk -F "." '{print \$13}' | tr -d "\r"`;
|
||||||
@ -248,9 +248,11 @@ if ($module eq "process") {
|
|||||||
$command_line_parammeters = "-v $version -c $community $host";
|
$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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user