Hi ,
The below script is what i use to monitor the load average on linux servers.
Since the threshold value is not static I was forced to set the status as 0 and 1 in the below script. It resulted showing the chart data in 0 and 1
I would like to get the exact value in the custom chart since i was able to get that in the output as below :
In the below example it pulls the information from statistic load avg which resulting in showing graph as 0 to 1
Is there anyway i can get a custom chart which actually shows the value rendered from the load average...
Output Result:
Message.Load_Average:Load Average is more: 24.13. Statistic.Load_Average:1
---------
#!/bin/bash
load_average=`cat /proc/loadavg | awk {'print $2'}`
cpu_cores=`cat /proc/cpuinfo | grep 'processor' | wc -l`
if [[ "$load_average" -le "$cpu_cores" ]]; then
status=0
echo "Statistic.Load_Average: $status";
echo "Message.Load_Average: Load Average is OK: $load_average";
else
status=1
echo "Statistic.Load_Average: $status";
echo "Message.Load_Average: Load Average is more: $load_average";
fi;
exit 0;