Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_cpu_info
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Testing script locally (after downloading script make sure script is in executable mode)
user@localhost$ chmod +x check_cpu_info
user@localhost$ ./check_cpu_info
[CPU_INFO: 2.90% ] User: 0.00% - System: 2.90% - Idle: 97.10% - IOwait: 0.00% | - Nice: 0.00% - Hardware_interrupts: 0.00% - Software_interrupts: 0.00% - Steal: 0.00%
---------===========---------
Getting remote CPU information for remote client using nrpe. Note that information like nice, hi, si and steal are disable on display.
1. On Server:
1.1. define service
root@server#vim /usr/local/nagios/etc/servers/clients.cfg
define service {
use generic-service
host_name
service_description CPU INFO
check_command check_nrpe_cpu
notifications_enabled 0
}
1.2. define command
root@server#vim /usr/local/nagios/etc/objects/commands.cfg
define command {
command_name check_nrpe_cpu
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_cpu
register 1
}
#/etc/init.d/nagios restart
NOTE: Make sure you have /usr/local/nagios/libexec/check_nrpe file. Sometimes it is located under /usr/lib/nagios/plugins/check_nrpe. In that case copy the file to previous location.
2. On Client: (move check_cpu_info plugin inside /usr/lib/nagios/plugins/)
root@client#vim /etc/nagios/nrpe.cfg
command[check_cpu]=/usr/lib/nagios/plugins/check_cpu_info -w 80 -c 90
#/etc/init.d/nagios-nrpe-server restart
user@localhost$ chmod +x check_cpu_info
user@localhost$ ./check_cpu_info
[CPU_INFO: 2.90% ] User: 0.00% - System: 2.90% - Idle: 97.10% - IOwait: 0.00% | - Nice: 0.00% - Hardware_interrupts: 0.00% - Software_interrupts: 0.00% - Steal: 0.00%
---------===========---------
Getting remote CPU information for remote client using nrpe. Note that information like nice, hi, si and steal are disable on display.
1. On Server:
1.1. define service
root@server#vim /usr/local/nagios/etc/servers/clients.cfg
define service {
use generic-service
host_name
service_description CPU INFO
check_command check_nrpe_cpu
notifications_enabled 0
}
1.2. define command
root@server#vim /usr/local/nagios/etc/objects/commands.cfg
define command {
command_name check_nrpe_cpu
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_cpu
register 1
}
#/etc/init.d/nagios restart
NOTE: Make sure you have /usr/local/nagios/libexec/check_nrpe file. Sometimes it is located under /usr/lib/nagios/plugins/check_nrpe. In that case copy the file to previous location.
2. On Client: (move check_cpu_info plugin inside /usr/lib/nagios/plugins/)
root@client#vim /etc/nagios/nrpe.cfg
command[check_cpu]=/usr/lib/nagios/plugins/check_cpu_info -w 80 -c 90
#/etc/init.d/nagios-nrpe-server restart
Reviews (0)
Be the first to review this listing!