Page 1 of 1
CPU Load - 5m 15m missing in graphs
Posted: Tue Jun 21, 2016 10:06 am
by CFT6Server
I have a service check that checks for CPULoad for a linux machine. The performance data has the proper results of 1m, 5m, 15m. However the graphs only shows 1m. Please advise.
load.JPG
details.JPG
Re: CPU Load - 5m 15m missing in graphs
Posted: Tue Jun 21, 2016 10:35 am
by jomann
What check are you running? The performance data looks off... there should be ; at the end of each line, like so:
time=0.217354s;;;0.000000 size=557B;;;0
As per the plugin guidelines here:
https://assets.nagios.com/downloads/nag ... inapi.html
Re: CPU Load - 5m 15m missing in graphs
Posted: Tue Jun 21, 2016 10:40 am
by CFT6Server
We are using check_linux_cpuload.pl
cpuload.JPG
Re: CPU Load - 5m 15m missing in graphs
Posted: Tue Jun 21, 2016 2:03 pm
by rkennedy
As @jomann mentioned, your plugin doesn't look to be following the plugin requirements.
https://nagios-plugins.org/doc/guidelin ... PLUGOUTPUT
Here's how your plugin is outputting -
Code: Select all
# Build performance data line
$perfdata=sprintf("Load1m=%.2f Load5m=%.2f Load15m=%.2f",$Load1min,$Load5min,$Load15min);
The guidelines -
Code: Select all
space separated list of label/value pairs
label can contain any characters except the equals sign or single quote (')
the single quotes for the label are optional. Required if spaces are in the label
label length is arbitrary, but ideally the first 19 characters are unique (due to a limitation in RRD). Be aware of a limitation in the amount of data that NRPE returns to Nagios
to specify a quote character, use two single quotes
warn, crit, min or max may be null (for example, if the threshold is not defined or min and max do not apply). Trailing unfilled semicolons can be dropped
min and max are not required if UOM=%
value, min and max in class [-0-9.]. Must all be the same UOM. value may be a literal "U" instead, this would indicate that the actual value couldn't be determined
warn and crit are in the range format (see the Section called Threshold and ranges). Must be the same UOM
UOM (unit of measurement) is one of:
no unit specified - assume a number (int or float) of things (eg, users, processes, load averages)
s - seconds (also us, ms)
% - percentage
B - bytes (also KB, MB, TB)
c - a continous counter (such as bytes transmitted on an interface)
For the record, linking to your past thread regarding this. It may be worth looking into what @Box293 mentioned in our last response, as that will provide a bit of debugging.
https://support.nagios.com/forum/viewto ... 99#p163891
Re: CPU Load - 5m 15m missing in graphs
Posted: Tue Jun 21, 2016 2:07 pm
by CFT6Server
i have this running on quiet a few servers and only this check is showing this. Other checks are showing up fine on the graphs?
Re: CPU Load - 5m 15m missing in graphs
Posted: Tue Jun 21, 2016 4:13 pm
by tgriep
If the performance data for that check was changed in the past to a different label, number of labels, etc.. that could cause the graph to not show all of the performance data.
If you go to this folder
Code: Select all
/usr/local/nagios/share/perfdata/kdcnaggm01
and delete the xml and rrd files for that check, they should get recreated with all of the performance data values.
FYI, this will take around 20 minutes to repopulate the graph.
Re: CPU Load - 5m 15m missing in graphs
Posted: Tue Jun 21, 2016 4:24 pm
by ssax
It should work (works on mine too), please run this command on the broken one and post the output:
- Make sure to change HOSTNAME and SERVICENAME
Code: Select all
rrdtool info /usr/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd
Thank you