hosts.cfg and ping question

Marc Powell marc at ena.com
Wed Apr 7 22:20:08 CEST 2004


Julie Catellier <mailto:julie.catellier at vanderbilt.edu> wrote:
> When I first set up Nagios, I was able to set the check_command to
> check-host-alive and everything worked well.  Now, the initial hosts
> that I set up in hosts.cfg automatically ping for the host without
> any entry in the 'check-command' and I am not able to
> check-host-alive in any new host entries.  Is there any entry that
> overrides the hosts.cfg configuration?  Below is an example.  The

Possibly state retention but I don't believe that the check_command is
ignored with state retention enabled. I know I've seen specific
documentation that tells exactly what is important wrt retention but I
haven't been able to locate it on short notice.

> imap1 entry does not check-host-alive.  The smtp3 entry automatically
> pings the host.  I also double checked that check-host-alive does
> work for these hosts from the command line.       
> Any Ideas?
> 
> # 'smtp3' host definition
> define host{
>         use                     its-host                ; Name of
> host template to use
>         host_name               smtp3.x.x.x
>         alias                   VUmail: Mail Transport server
>         address                 xx.xx.xx.xx
>         }
> # 'imap1' host definition
> define host{
>         use                     its-host                ; Name of
> host template to use
>         host_name               imap1.x.x.x
>         alias                   VUmail: Personal mailbox server
>         address                 xx.xx.xx.xx
>         check_command           check-host-alive
>         notification_interval   120
>         notification_period     24x7
>         max_check_attempts      10
>         }

I'm going to bet that your its-host template contains the check_command
of check-host-alive and that's why smtp3 works (it's inherited). For
imap1, since you are using the same template it should also inherit the
check_command defined in its-host, _however_ the fact that you've
defined a check_command within the host definition itself overrides any
previously inherited definitions. What is the exact error that you're
seeing for this host that makes you think it's not working?

--
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