Almost there please assist...

Marc Powell marc at ena.com
Thu Apr 14 00:08:31 CEST 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Calvin Crutchfield
> Sent: Wednesday, April 13, 2005 4:10 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Almost there please assist...
> 
> OK.  Took me 2.5 days but I have NAGIOS and the interface running.
What
> I'm
> trying to do is to get a simple localhost ping working..  I have read
> plenty
> but not quite putting 2 and 2 together yet.
> 
> Solaris 9
> Latest Nagios and plugins
> 
> Assumptions.
> 
> *Commands can only be defined once amongst your included config files

In addition to Subhendu's response, your assumption might not be
correct. It's true that each 'define command{' must have a unique
command_name but you can reuse that command_name for multiple host or
service definitions. In your example previously, you could create a
generic check_ping command as you did for check_myhost and use that for
multiple host definitions. For a generic test you would substitute
127.0.0.1 in your command definition with the macro $HOSTADDRESS$ ala --

define command{
        command_name    check_ping
        command_line    /space/nagios/libexec/check_ping -H
$HOSTADDRESS$ -w
200,20% -c 300,30% -p 5
        }

define host{
        host_name                       nagios_server
        alias                           nagios server
        address                         localhost
        check_command                   check_ping
        max_check_attempts              5
        process_perf_data               0
        retain_nonstatus_information    0
        contact_groups                  router-admins
        notification_interval           30
        notification_period             24x7
        notification_options            d,u,r
        }

$HOSTADDRESS$ is taken from the address parameter in the host
definition. 

I would also reduce the number of max_check_attempts and the number of
pings sent out in the command. Nagios checks hosts in a serial manner
and only when a service check on that host fails. During a host check,
all other activity stops until the host check has reached
max_check_attempts. No other checks happen and no other updates happen
either. In your example, Nagios would stop doing everything except
checking this host for a full 25 seconds or more if it was really down
because you are sending 5 sets (max_check_attempts) of 5 pings (-p 5).
You want to reduce that to just the minimum necessary to be sure the
host is down. One or two pings should be sufficient.

--
Marc 


-------------------------------------------------------
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://ads.osdn.com/?ad_ide95&alloc_id396&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