check_command in Nagios 1.2
Marc Powell
marc at ena.com
Mon Dec 6 16:54:51 CET 2004
Yes, if your host provides no other services that are interesting to you
(i.e. a router or switch) you'll want to add a ping service check for
it.
Some relevant reading --
http://nagios.sourceforge.net/docs/1_0/networkreachability.html
http://www.nagios.org/faqs/viewfaq.php?faq_id=85&expand=false&showdesc=t
rue
http://www.nagios.org/faqs/viewfaq.php?faq_id=86
--
Marc
> -----Original Message-----
> From: Sergey Semenyuk [mailto:sergey at strategicvista.com]
> Sent: Monday, December 06, 2004 9:35 AM
> To: Marc Powell
> Cc: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] check_command in Nagios 1.2
>
> Thanks for advice.
> I just have noticed going through the sources that check_host is
> actually called from verify_host_"path" (whatever) when service status
> changes. And everything you said sounds perfectly understandable. So,
> you to check if the host is alive I need to have some kind of ping
> service, and both service and host status will change (just confirming
> my findings), because that "Assuming ..." was rather confusing.
>
> Thanks for clearing things out for me.
>
> Sergey Semenyuk
> LAN Administrator
> Strategic Vista International Inc.
> 300 Alden Road,
> Markham, ON, L3R 4C1
> Phone: (905) 946-8589 x 180
> Fax: (905) 947-0138
>
>
> -----Original Message-----
> From: Marc Powell [mailto:marc at ena.com]
> Sent: Monday, December 06, 2004 10:28 AM
> To: Sergey Semenyuk
> Cc: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] check_command in Nagios 1.2
>
> Do you have any service definitions for this host? The host will never
> be checked and will remain in a PENDING state if you do not have any
> services defined (that actually get checked themselves). Additionally,
> the host won't actually be checked and will only be assumed to be OK
> until one or more services on the host fails. It sounds to me like you
> don't have any services being checked on the host at this point.
>
> Additionally, a host check of 20 probably isn't a good idea. If the
host
> _were_ to be checked, nagios will stop all processing except for this
> host check until all 20 attempts have completed. No additional service
> checks, updates, event handlers, etc will run until this completes.
You
> should only perform the minimal number of pings/attempts to determine
> the state of the host. In many cases a single ping is sufficient or
just
> a handful if you have a lossy network.
>
> --
> Marc
>
> > -----Original Message-----
> > From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> > admin at lists.sourceforge.net] On Behalf Of Sergey Semenyuk
> > Sent: Monday, December 06, 2004 9:15 AM
> > To: 'Stephan Janosch'
> > Cc: nagios-users at lists.sourceforge.net
> > Subject: RE: [Nagios-users] check_command in Nagios 1.2
> >
> > Absolutely:
> >
> > Host (they are all the same)
> > define host{
> > use generic-host ; Name of
host
> > template to use
> >
> > host_name sfw
> > alias Main Router (Linux)
> > address 192.168.20.2
> > check_command check-host-alive (I tried
> > check-host-echo from the demo site as well)
> > parents mainswitch
> > checks_enabled 1
> > max_check_attempts 20
> > notification_period 24x7
> > notification_options d,u,r
> > stalking_options o,d,u
> > }
> >
> >
> > commands:
> >
> > define command{
> > command_name check-host-alive
> > command_line $USER1$/check_ping -H $HOSTADDRESS$ -w
> > 3000.0,80% -c 5000.0,100% -p 1
> > }
> >
> >
> > define command{
> > command_name check-host-echo
> > command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 7
> > }
> >
> > No firewalls on internal network at all.
> > Started looking sources, and debug0, no check_host calls at all.
> >
> > Thanks in advance.
> >
> >
> > -----Original Message-----
> > From: Stephan Janosch [mailto:Stephan.Janosch at interface-business.de]
> > Sent: Monday, December 06, 2004 10:03 AM
> > To: Sergey Semenyuk
> > Cc: nagios-users at lists.sourceforge.net
> > Subject: Re: [Nagios-users] check_command in Nagios 1.2
> >
> > Sergey Semenyuk wrote:
> > > Hi,
> > >
> > > I am having issues with check_command in hosts specifications. I
> have
> > > actually used sample configuration files and checked the configs
on
> > the
> > > demo site, but still no luck. I tried getting some help from the
IRC
> > > channel but RTFM was the answer. I figure that even if I read the
> > manual
> > > for ten times I will barely become smarter. All other plugins and
> > > commands specifications work fine, but hosts check_command doesn't
> > seem
> > > to work for me at all and I get PENDING status with not enough
> > > information. I tried various debug levels but don't seem to see
from
> > > them that Nagios actually tries running that check_command. Any
> other
> > > place except for the sources I have to look?
> > >
> > > Thanks in advance.
> > >
> > > Sergey
> >
> > Can you post at least one host definition here? And please post the
> > definition of the host check command too!
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
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