hosts.cfg and ping question

Marc Powell marc at ena.com
Thu Apr 8 16:32:10 CEST 2004


Julie Catellier <mailto:julie.catellier at vanderbilt.edu> wrote:
> Ok, what makes me think that it is not working?  When I bring up one
> of the status windows, i.e. 'Host Detail', the smtp servers show
> 'PING OK..'. When I select an smtp server, 'Host Checks' and 'Host

It shows 'PING OK' because you've had a service failure on the device
but the host was still up.

> Notifications' are enabled.  The other servers show '(Host assumed to
> be up)' and the 'Host Checks' and 'Host Notifications' are disabled. 

'Host assumed to be up' is normal for a host that has not experienced
any service failures. The fact that Host Checks and Host Notifications
are disabled in the new hosts leads me to believe that you are
experiencing a problem related to state retention and your its-host
template. I'm going to be speculating some since we haven't seen the
actual its-host template definition but I suspect that the template
contains 'checks_enabled 0' and 'notifications_enabled 0' and that those
settings were not present when your original working hosts were added.
With state retention enabled (either on a host or global basis), that
would result in the symptoms you are seeing. If they are or are not
present, I would personally disable all state retention both in
nagios.cfg 
(specifically retain_state_information) and in any templates or host
definitions you have and restart nagios to see if that changes anything
and in which direction.

--
Marc 

> I looked at the retention values in Nagios.cfg.  The
> retention_update_interval=60 and use_retained_program_state=0.  I
> have also restarted nagios mulitple times.      
> Can you see something that I am missing from this description?
> 
> --On Wednesday, April 07, 2004 3:20 PM -0500 Marc Powell
> <marc at ena.com> wrote: 
> 
> > 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? 




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