CPU Load - 5m 15m missing in graphs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

CPU Load - 5m 15m missing in graphs

Post 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
You do not have the required permissions to view the files attached to this post.
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: CPU Load - 5m 15m missing in graphs

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: CPU Load - 5m 15m missing in graphs

Post by CFT6Server »

We are using check_linux_cpuload.pl
cpuload.JPG
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: CPU Load - 5m 15m missing in graphs

Post 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
Former Nagios Employee
CFT6Server
Posts: 506
Joined: Wed Apr 15, 2015 4:21 pm

Re: CPU Load - 5m 15m missing in graphs

Post 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?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: CPU Load - 5m 15m missing in graphs

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: CPU Load - 5m 15m missing in graphs

Post 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
Locked