Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
patrickz
bypatrickz, December 6, 2012
$ret_string="";
$perfvalue="";
# Getting Individual CPU Load
$i=0;
foreach ( @pourcentage ) {
s/HOST-RESOURCES-MIB::hrProcessorLoad.d+ = INTEGER://g;
$cpuuse=$_;
$ret_string .= "CPU-$i:$cpuuse%, ";
$perfvalue .= "CPU-$i=$cpuuse%;$warning;$critical;0;100 ";
$i++;
}
print $ret_string." | ".$perfvalue."
";
$perfvalue="";
# Getting Individual CPU Load
$i=0;
foreach ( @pourcentage ) {
s/HOST-RESOURCES-MIB::hrProcessorLoad.d+ = INTEGER://g;
$cpuuse=$_;
$ret_string .= "CPU-$i:$cpuuse%, ";
$perfvalue .= "CPU-$i=$cpuuse%;$warning;$critical;0;100 ";
$i++;
}
print $ret_string." | ".$perfvalue."
";