Using Nagios to monitor "service-less" hosts

Andy Shellam (Mailing Lists) andy.shellam-lists at mailnetwork.co.uk
Tue Nov 7 17:24:07 CET 2006


Hi,
> I cann't locate active or passive checks directives related with hosts in
> the documentation
> (http://nagios.sourceforge.net/docs/1_0/xodtemplate.html#host). However,
> there is such directives related with services, in particular
> active_check_enabled and passive_check_enabled
> (http://nagios.sourceforge.net/docs/1_0/xodtemplate.html#service). However,
> I have checks_enabled directive in the hosts activate. Also note there is
> not equivalents to normal_check_interval or retry_check_interval (for
> services) in host objects (apparently). 
>
> Maybe I'm using a too old Nagios release? I'm using 1.4-2 but I've seen the
> most recent one is 2.5.
>
>   

Ah, maybe that's why - I'm using 2.5.  The 2.0 hosts documentation does 
have active_checks_enabled and passive_checks_enabled parameters.
Here's the config for my SC-Gateway - note the use of the host template, 
and the lack of services:

------------------------------------------------------------------------------
Nagios 2.5
Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org)
Last Modified: 07-13-2006
License: GPL

Reading configuration data...

Running pre-flight check on configuration data...

Checking services...
        Checked 39 services.
Checking hosts...
Warning: Host 'FH-Gateway' has no services associated with it!
Warning: Host 'SC-Gateway' has no services associated with it!
        Checked 6 hosts.
Checking host groups...
        Checked 2 host groups.
Checking service groups...
        Checked 0 service groups.
Checking contacts...
        Checked 1 contacts.
Checking contact groups...
        Checked 1 contact groups.
Checking service escalations...
        Checked 0 service escalations.
Checking service dependencies...
        Checked 0 service dependencies.
Checking host escalations...
        Checked 0 host escalations.
Checking host dependencies...
        Checked 0 host dependencies.
Checking commands...
        Checked 18 commands.
Checking time periods...
        Checked 2 time periods.
Checking extended host info definitions...
        Checked 6 extended host info definitions.
Checking extended service info definitions...
        Checked 0 extended service info definitions.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 2
Total Errors:   0

Things look okay - No serious problems were detected during the 
pre-flight check
------------------------------------------------------------------------------

Host definition for SC-Gateway:
------------------------------------------------------------------------------
define host {
    name                Host_Template
    register            0
    check_command            Check_PING!$HOSTADDRESS$
    max_check_attempts        2
    check_interval            1
    active_checks_enabled        1
    passive_checks_enabled        1
    check_period            always
    obsess_over_host        1
    check_freshness            1
    freshness_threshold        0
#    event_handler
    event_handler_enabled        0
    low_flap_threshold        0
    high_flap_threshold        0
    flap_detection_enabled        1
    process_perf_data        1
    retain_status_information    1
    retain_nonstatus_information    1
    contact_groups            NetServe
    notification_interval        0
    notification_period        always
    notification_options        d,u,r
    notifications_enabled        1
#    stalking_options       
}

define host {
    host_name            SC-Gateway
    use                Host_Template
    alias                GATEWAY: Server City (TelXchange)
    address                84.45.66.1
}
------------------------------------------------------------------------------

And the definition of the Check_PING command:
------------------------------------------------------------------------------
define command {
    command_name        Check_PING
    command_line        /usr/local/nagios/libexec/check_ping -H $ARG1$ 
-p 10 -w 500,50% -c 1000,100%
}
------------------------------------------------------------------------------

Hope this helps!

Andy.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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