NRPE worked fine and then...
Posted: Fri Apr 27, 2012 2:04 pm
Hey all, I'm working on getting NRPE to run under Nagios. I set up my own workstation as a guinea pig and after creating my NRPE config file I was able to get a CPU Load service working. I went for a second service and decided to change the host_name to hostgroup in my Service Definitions like I did with my check_nt but no joy; neither service worked. I changed my hostgroup back to host_name and still no joy. I changed back to just the one service, the CPU Load service, and STILL no joy. Now I'm getting this error in my Nagios for the service that worked previously:
UNKNOWN: No handler for that command
As far as I can tell my .cfg file is just like it was when it worked originally. Here's the file. Can anyone see some glaring omissions or anything else that I may have restored incorrectly? The only two "Definitions" I messed with were the Service Definitions:
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
# Config file create 4/26/12
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
define host{
name xp_nrpe
use generic-host
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period 24x7
notification_interval 30
notification_options d,r
contact_groups admins
register 1
}
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
# Host Definitions
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
define host{
use xp_nrpe
host_name jobee1
alias Jobeez Workstation
address 192.168.2.22
}
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
# Host Group Definitions
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
define hostgroup {
hostgroup_name xp_nrpegroup
alias XP workstations with NRPE
members jobee1
}
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
# Service Definitions
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
define service {
use generic-service
host_name jobee1
service_description CPU Load
check_command check_nrpe!check_load
}
If I run this from the command line:
check_nrpe -H IP -p 5666 -c CheckCPU -a warn=100 crit=100 time=1 warn=95 crit=99 time=5 warn=90 crit=95 time=15
I get an "OK CPU Load ok" message. What am I doing wrong?
Thanks,
Joe B
UNKNOWN: No handler for that command
As far as I can tell my .cfg file is just like it was when it worked originally. Here's the file. Can anyone see some glaring omissions or anything else that I may have restored incorrectly? The only two "Definitions" I messed with were the Service Definitions:
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
# Config file create 4/26/12
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
define host{
name xp_nrpe
use generic-host
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period 24x7
notification_interval 30
notification_options d,r
contact_groups admins
register 1
}
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
# Host Definitions
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
define host{
use xp_nrpe
host_name jobee1
alias Jobeez Workstation
address 192.168.2.22
}
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
# Host Group Definitions
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
define hostgroup {
hostgroup_name xp_nrpegroup
alias XP workstations with NRPE
members jobee1
}
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
# Service Definitions
# >>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<
define service {
use generic-service
host_name jobee1
service_description CPU Load
check_command check_nrpe!check_load
}
If I run this from the command line:
check_nrpe -H IP -p 5666 -c CheckCPU -a warn=100 crit=100 time=1 warn=95 crit=99 time=5 warn=90 crit=95 time=15
I get an "OK CPU Load ok" message. What am I doing wrong?
Thanks,
Joe B