Page 1 of 1

check-host-alive IS defined

Posted: Tue Mar 13, 2012 5:17 pm
by jbruyet
Hey all, my servers and upper-echelon workstations are being monitored just fine but they all show a status of Pending. I read that it's an issue with the check-host-alive command not being defined. As far as I can tell it IS being defined. Here's my stuff:

In host template:
define host{
name generic-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
max_check_attempts 5 ; Pulled this value out of the manual
check_command check-host-alive-ping
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
register 1 ; This host registered 3/8/12 to fight errors
}

In commands.cfg:
define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}

The error when I do nagios -v:
Error: # 'check-host-alive' command definition specified for host 'srv-Jobee' is not defined anywhere!

I'm struggling a little with this because my first Nagios server was on a Debian server and I kept having problems. On top of that files from a package install were in different locations than they are in a source install. SO, am I missing another file that needs the command defined in it?

Thanks,

Joe B

Re: check-host-alive IS defined

Posted: Wed Mar 14, 2012 4:54 pm
by jsmurphy
jbruyet wrote:check_command check-host-alive-ping
command_name check-host-alive
Spot the difference ;)

Re: check-host-alive IS defined

Posted: Wed Mar 14, 2012 6:52 pm
by jbruyet
Sheesh! That's what I get for blindly following the instructions I get off of those web sites. Thanks AGAIN jsmurphy. You've rescued my bacon several times now.

I made the commands the same and now I just have a few Windows machines that are pending. I expect them to ALL be green before I go home this evening. Nope, I just checked and they're all green now.

Thanks again,

Joe B

Re: check-host-alive IS defined

Posted: Thu Mar 15, 2012 5:03 pm
by jsmurphy
A second set of eyes will sometimes notice something in seconds that you could otherwise spend days on :lol: