LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Monitor CPU utilization using nagios (https://www.linuxquestions.org/questions/linux-newbie-8/monitor-cpu-utilization-using-nagios-4175549241/)

telltobalaji 07-29-2015 04:53 AM

Monitor CPU utilization using nagios
 
HI

I need to get alert if cpu utilization is more using nagios. Scenario given below

CPU Utilization OK CPU Status OK: When CPU usage is less than 80%.
WARNING CPU Status WARNING:When CPU usage is more than 80%. CRITICAL CPU Status CRITICAL:When CPU usage is more than 90%.

Please help

Habitual 07-30-2015 02:43 PM

Quote:

Originally Posted by telltobalaji (Post 5397692)
Please help

https://www.nagios.org/documentation is a great source of 'help'.
Let us know where you get stuck.

telltobalaji 08-03-2015 12:25 AM

HI

I am using the plugin check_cpu. But this plugin is showing result as below

https://mail.google.com/mail/u/0/?ui...cb11&zw&atsh=1

telltobalaji 08-03-2015 12:26 AM

If you click the above link it will show status information Missing host or passwords arguments


Pls Let us know what to do

unSpawn 08-03-2015 05:32 AM

I'm sorry but you should either post your text here or in a pastebin and not Gmail.
So:
- do read the general Nagios documentation and the one for check_cpu,
- adjust your configuration as required,
- and to to test supply all required arguments, run the check from the command line and post the results.

*Do obfuscate credentials (if any) and public IP addresses though.

Habitual 08-03-2015 05:23 PM

Quote:

Originally Posted by telltobalaji (Post 5400020)
HI

I am using the plugin check_cpu. But this plugin is showing result as below

https://mail.google.com/mail/u/0/?ui...cb11&zw&atsh=1

Not everyone that can help you has a gmail account to view that image.
Maybe try uploading it to http://susepaste.org/ ?

telltobalaji 08-03-2015 11:47 PM

HI

Below i have given the commands.cfg and services.cfg file output. Pls check

commands.cfg
============
# 'check_cpu' command definition
# w = Warning level (if CPU idle falls below this level)
# c = Critical level
define command{
command_name check_cpu
command_line $USER1$/check_cpu -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
}

services.cfg
============
define service{
use local-service ; Name of service template to use
host_name localhost
service_description CPU Average
check_command check_cpu!40!70
notifications_enabled 1
}

Output of Nagios:
===================
localhost

CPU Average OK 08-03-2015 10:12:25 0d 0h 7m 12s 1/4 Missing Host or Password arguments

My output in status information is coming like Missing Host or Password arguments. I dont no what mistake i am doing. Pls help me to fix this issue.

---------- Post added 08-03-15 at 11:47 PM ----------

I am checking CPU for my localhost itself


All times are GMT -5. The time now is 08:30 PM.