CPU utilization alerts on Nagios application server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Mahesh786
Posts: 30
Joined: Mon Apr 05, 2021 9:21 am

CPU utilization alerts on Nagios application server

Post by Mahesh786 »

HI Team,

Please help us how we can set up CPU utilization alerts on Nagios application server.

Note: Currently, we have set up load average but we need CPU utilization alerts.

Regards,
Venkata Reddy
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: CPU utilization alerts on Nagios application server

Post by gsmith »

Hi

Please provide us some clarification.

- do you need to know how to set up alerts on the load averages you are monitoring?
- do you need to know how to set up monitoring and alerts for CPU utilization?
- is the goal to monitor cpu utilization of a Nagios XI server?
- what Operating System is being used by the server you are trying to monitor?

Thanks
Mahesh786
Posts: 30
Joined: Mon Apr 05, 2021 9:21 am

Re: CPU utilization alerts on Nagios application server

Post by Mahesh786 »

Hi,

Please find the below:

- do you need to know how to set up alerts on the load averages you are monitoring?- No
- do you need to know how to set up monitoring and alerts for CPU utilization?-Yes
- is the goal to monitor cpu utilization of a Nagios XI server?-Yes
- what Operating System is being used by the server you are trying to monitor?-CentOS Linux release 8.3.2011

Regards,
Venkata Reddy
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: CPU utilization alerts on Nagios application server

Post by gsmith »

Hi Venkata,

Thank you very much for your responses!

One more question for you. Are you using two Nagios servers?
One to monitor your existing IT infrastructure (let's call him server nagios_A), with another separate
Nagios server (let's call him server nagios_B) to monitor the nagios_A server?

Thanks
Mahesh786
Posts: 30
Joined: Mon Apr 05, 2021 9:21 am

Re: CPU utilization alerts on Nagios application server

Post by Mahesh786 »

H,

Please find the below.

One more question for you. Are you using two Nagios servers?- No, We are using only one Nagios application server.

Currently we are monitoring load average for that server but now we are planning to remove load average and enable the CPU monitoring.

Regards,
Venkata Reddy
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: CPU utilization alerts on Nagios application server

Post by gsmith »

Hi

Take a look at the check_cpu_stats.sh plugin:

Code: Select all

[root@gs-cent8-23-82 libexec]# ./check_cpu_stats.sh -h

check_cpu_stats.sh Revision 1.3.1 - CPU Utilization check script for Nagios

Usage: check_cpu_utilization.sh -w <warning value in % for iowait>

                -w  Warning level for cpu iowait
                -h  Show this page

Usage: check_cpu_stats.sh
Usage: check_cpu_stats.sh --help
Usage: check_cpu_stats.sh -w <warning>


Revision 1.3.1 (c) 2007 Steve Bosek ([email protected])

This plugin will check cpu utilization (user,system,iowait,idle in %)
-w is for reporting warning levels in percent of iowait
This plugin is provided with Nagios XI. There may be other plugins you might
be interested in at https://exchange.nagios.org/

For the check_cpu_stats.sh plugin you will need to create a command that calls out that plugin.
If you need guidance in creating the command please let me know.

Thanks
Mahesh786
Posts: 30
Joined: Mon Apr 05, 2021 9:21 am

Re: CPU utilization alerts on Nagios application server

Post by Mahesh786 »

Hi,

Please help me to create a command for check_cpu_stats.sh plugin and to set up the critical and warning threshold.

Regards,
Venkata Reddy
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: CPU utilization alerts on Nagios application server

Post by gsmith »

Hi

Please watch the attached video file which will show you how
to create the command and apply it as a service.

You will need to rename the file from check_cpu.txt to check_cpu.mp4

Let me know if you have any questions.

Thanks
You do not have the required permissions to view the files attached to this post.
Locked