Random Project

Add Performance Data

To add performance data, change line 83-end:
if($tmm_cpu > $cpu_crit) {
print “CRITICAL: TMM CPU utilization on $host is higher than threashold ($cpu_crit) – $tmm_cpu%”;
$RC=$ERRORS{“CRITICAL”};
}
if($mem_prct > $mem_crit){
print “CRITICAL: TMM Memory utilization on $host is higher than threashold ($mem_crit) – $mem_prct%”;
$RC=$ERRORS{“CRITICAL”};
}
if($tmm_cpu > $cpu_warn) {
print “WARNING: TMM CPU utilization on $host is higher than threashold ($cpu_warn) – $tmm_cpu%”;
$RC=$ERRORS{“WARNING”};
}
if($mem_prct > $mem_warn){
print “WARNING: TMM Memory utilization on $host is higher than threashold ($mem_warn) – $mem_prct%”;
$RC=$ERRORS{“WARNING”};
}
if (!defined $RC){
print “OK: TMM CPU is $tmm_cpu%, TMM Memory utilization is $mem_prct%”;
$RC=$ERRORS{“OK”};
}
print “| cpu_percent=$tmm_cpu;$cpu_warn;$cpu_crit memory_percent=$mem_prct;$mem_warn;$mem_crit
“;
exit($RC);