Page 1 of 1

average CPU and memory

Posted: Mon Jan 29, 2018 6:44 am
by anish
Hi Team,

We are getting CPU & Memory Average report from Nagios Xi. it show more average value. please find the example below.

If the server is shutdown, does the CPU and Mem average calculation in Nagios take this in to account?

So as an example, in a 10 day period, an Server is running for 5 days with avg CPU of 50%.
So Nagios reports shows 10 days value or 5 days value average.
we need exact value server uptime value only. How to calculate it.

we have attached example performance report.

Re: average CPU and memory

Posted: Mon Jan 29, 2018 12:09 pm
by kyang
I just looked into this, and I think it does average it out based on your timeframe.

It does not take into account of when the server was up or down.

Assuming this check is using NSClient (check_nt) correct?

Re: average CPU and memory

Posted: Tue Feb 20, 2018 5:41 am
by anish
Hi,

Please find the below screen shot. We have configured check_nt for cpu parameter.

Please check and let us know.

Re: average CPU and memory

Posted: Tue Feb 20, 2018 12:43 pm
by lmiltchev
I believe you misunderstood how this check works. It doesn't calculate the CPU average for 5 or 10 days as you cannot use more than 1440 min or 1 day (24*60). The check only calculates the CPU average for the "last x minutes", whatever you passed to the "-l" flag ( 2 minutes in your particular case). Then, the result is plotted on the graph.

See the usage of the check_nt with the CPULOAD option 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
If you didn't want the check to be run at all when the server is down, you could set up a service dependency - make this service dependent on another (master) service (the Ping service), and set the execution failure criteria = c,u. In this case, the dependent service (CPU Average) will not be actively checked if the master service (Ping) is in either CRITICAL, or an UNKNOWN state. You can read more about host/service dependencies here:

https://assets.nagios.com/downloads/nag ... ncies.html

Hope this helps.