Page 1 of 1

NSClient check_cpu

Posted: Mon Nov 25, 2019 3:44 am
by andyb4u
Hi,

This may be the wrong place to ask this, I know NSClient is not a Nagios supported product but my manager has asked me to ask anyway.

It relates to the NSClient command check check_cpu:

There does not appear to be any documentation on the time argument, explaining how the NSClient can check at different time intervals.

Does the NSClient:
  • Save the values of the CPU load every 5 seconds.
    Therefore, this enables you to report on an average figure over a time period
    How far in time can you go back – 15 minutes or since the nsclient agent was restarted?
  • Where does the CPU load value comes from? - performance counters?:
    CounterName = "% Processor Time";CategoryName = "Processor";InstanceName = "_Total";
If anyone can shed any light about how check_cpu works it would be greatly appreciated.

Regards,
Andy

Re: NSClient check_cpu

Posted: Mon Nov 25, 2019 11:47 am
by lmiltchev
Does the NSClient:

Save the values of the CPU load every 5 seconds.
Therefore, this enables you to report on an average figure over a time period
How far in time can you go back – 15 minutes or since the nsclient agent was restarted?
I didn't find any information on that by looking at the NSClient++ documentation. You are correct - NSClient++ is not developed or maintained by us (Nagios), so I would recommend that you post your question on their support forum.

FYI, you could use check_nt and CPULOAD, with which you could monitor average CPU load on the last x minutes. See the usage below:
CPULOAD =
Average CPU load on last x minutes.
Request a -l parameter with the following syntax:
-l <minutes range>,<warning threshold>,<critical threshold>.
<minute range> should be less than 24*60.
Thresholds are percentage and up to 10 requests can be done in one shot.
ie: -l 60,90,95,120,90,95
Where does the CPU load value comes from? - performance counters?:
CounterName = "% Processor Time";CategoryName = "Processor";InstanceName = "_Total";
Again, this is a question for the NSClient++ support forum. We don't have access to the source code, so we don't know how the CPU load is calculated.