check_command in hosts or service defination

Marc Powell marc at ena.com
Fri Mar 19 20:45:47 CET 2004


On Friday, March 19, 2004 1:20 PM, Naman Latif shared with us:

> Hi,
> I am trying to understand the reason for the check_command to be
> defined in both "host" and "service" definition. 
> 
> E.g. If I have a device "test" and I want check its availability
> using check_ping, then I will need(?) to define a service "ping" and
> specify the check_ping as the check_command. In this case, do I need
> to define it in the "host" definition also ?   


Nagios is first and foremost a service monitoring program. Pretty much
everything revolves around the availability of a service as opposed to a
host. The logic is that if a service on a host is working properly,
there is no need to check the status of the host at all. If a service on
a host isn't working properly, only then do you want to make sure that
the host is up and working. That is one reason why you have a specific
host check defined. Host checks are also use to determine reachability,
dependencies, etc. In you above example, if the device has no other
services that you are interested in checking and only care that it is
'on', then yes, you will have to define a ping or other type of service,
remembering that a host will never be checked unless there is a service
failure on that host. That being said, if this device isn't used as a
parent to other hosts, there are no other defined dependencies on this
host or you just don't care about host status or availability being
accurately reflected in the web pages then yes, you can get away with
not having a check_command defined for the host. You will still need to
have a service defined though.


http://nagios.sourceforge.net/docs/1_0/networkreachability.html has some
light reading that is pertinent.

--
Marc


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list