Calculate Average

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rexmundo
Posts: 29
Joined: Mon Jul 20, 2020 3:28 pm

Calculate Average

Post by rexmundo »

Hi

Is there a way for Nagios to calculate the average of a metric and raise an alert if above a threshold?

For example, if we are monitoring CPU, average the last 10 readings and if over 80% raise an alert?

This is something we could do with Appmon.

rgds
George
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Calculate Average

Post by benjaminsmith »

Hi Rexmundo,

For the case of CPU, a load check is used to determine the CPU demand over a given time period. For example, the check_load plugin can check against the 1, 5, and 15-minute load averages on the system.

The format is as follows:

Code: Select all

 ./check_load -w 5.0,4.0,3.0 -c 10.0,6.0,4.0
OK - load average: 0.55, 0.46, 0.30|load1=0.550;5.000;10.000;0; load5=0.460;4.000;6.000;0; load15=0.300;3.000;4.000;0;
Beyond that, there may be a community plugin with that kind of functionality or it would take a custom plugin to check against a historical average.

Let me know if you have further questions.

Regards,
Benjamin

References:
https://www.site24x7.com/blog/load-aver ... ux-servers
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked