check_ping stuck on 'PENDING'

Robert Yeo r.yeo at utah.edu
Mon Jan 12 20:24:26 CET 2009


The problem was same host dependencies.

In my first config I setup Check NRPE to have the same services on the box
be dependent on it by declaring them again below.  This worked on a nagios
2.x series just fine, but 3.x has a better way to declare it.

Nagios 2.x version -

define servicedependency{
    hostgroup_name                    Nmw_Servers,Wi_Servers
    host_name      
!Nmw_104_010_Finearts_Dataserver,!Nmw_104_020_Nagios,!Nmw_104_011_Finearts_F
ileserver,Dgh_000_012_FairUse,Art_104_014_FilmServer,!Nmw_104_092_Nagios3
    
    service_description                Check NRPE
    dependent_hostgroup_name           Nmw_Servers,Wi_Servers
    dependent_host_name
!Nmw_104_010_Finearts_Dataserver,!Nmw_104_020_Nagios,!Nmw_104_011_Finearts_F
ileserver,Dgh_000_012_FairUse,Art_104_014_FilmServer,!Nmw_104_092_Nagios3
    dependent_service_description    Check CPU Load,Check Free Space,Current
Users,Total Processes,Zombie Processes
    
    execution_failure_criteria         w,u,c,p
    notification_failure_criteria      w,u,c,p
    }

Nagios 3.x version -

define servicedependency{
    hostgroup_name                    Nmw_Servers,Wi_Servers
    host_name      
!Nmw_104_010_Finearts_Dataserver,!Nmw_104_020_Nagios,!Nmw_104_011_Finearts_F
ileserver,Dgh_000_012_FairUse,Art_104_014_FilmServer,!Nmw_104_092_Nagios3
    
    service_description               Check NRPE
    dependent_service_description     Check CPU Load,Check Free
Space,Current Users,Total Processes,Zombie Processes
    
    execution_failure_criteria        w,u,c,p
    notification_failure_criteria     w,u,c,p
    }

The 3.x version is much much simpler.

Just a note that the -v check will throw no errors with the 2.x style check
and the service will then be in a "stuck" state.  In my case with the
retention file the state was OK and I didn't realize the problem until a
power outage.  Hope this helps someone else in the future.

Thanks again,

Rob Yeo


On 1/12/09 9:22 AM, "Robert Yeo" <r.yeo at utah.edu> wrote:

> Service dependencies.
> 
> I commented them out and everything works fine.  They do not get flagged as
> wrong and worked fine in the 2.x series, so I need to make some changes.
> Thanks for help!   I should have went that route earlier but the behavior
> was so odd with some hosts OK and others not with the same check in the same
> config I though "nah."  My mistake.
> 
> If it helps at all I will follow up with the corrections that need to be
> made to the dependencies in case anyone else runs into this on a 2.x to 3.x
> migration.
> 
> Thanks,
> 
> Rob Yeo
> 
> On 1/12/09 9:00 AM, "jmoseley at corp.xanadoo.com" <jmoseley at corp.xanadoo.com>
> wrote:
> 
>> 
>> 
>> 
>> 
>> 
>> Marc Powell <marc at ena.com> wrote:
>> 
>> 
>> 
>>> It means "don't apply the service to this host if it's in one of the
>>> named hostgroups." It's not documented quite like the OP's use but I
>>> expect it will work.
>>> 
>>> See 'Excluding Hosts' at
>> http://nagios.sourceforge.net/docs/3_0/objecttricks.html
>> 
>> Good, I learned something new.  I still think it's a great idea, though, to
>> simplify the configuration as much as possible when dealing with a single
>> host that is having problems.  ;-)
>> 
>> James
>> 
>> 
>> 
----------------------------------------------------------------------------->>
-
>> Check out the new SourceForge.net Marketplace.
>> It is the best place to buy or sell services for
>> just about anything Open Source.
>> http://p.sf.net/sfu/Xq1LFB
>> _______________________________________________
>> 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
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> 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


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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