Ping problem

Kalelme kalelme at cantv.net
Sun Nov 10 17:11:16 CET 2002


> Your problem lies in that you are not using a macro defined in the
> checkcommands.cfg as your check_command.

this is the macros in the checkcommands.cfg

# 'check_ping' command definition
define command{
        command_name    check_ping
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c
$ARG2$ -p 5
        }

#the check server-live is

# 'check-host-alive' command definition
define command{
        command_name    check-host-alive
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c
5000.0,100% -p 1
        }

this in the services.cfg

# Service definition
define service{
        use                             generic-service         ; Name of
service template to use

        host_name                           linux1
        service_description               PING
        is_volatile                         0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           20
        retry_check_interval            1
        contact_groups                  linux-admins
        notification_interval           240
        notification_period             24x7
        notification_options            c,r
        check_command                   check_ping!100.0,20%!500.0,60%
        }

$USER$ =/usr/local/nagios/libexec

and the hosts.cfg

# 'linux1' host definition
define host{
        use                     generic-host            ; Name of host
template to use

        host_name               linux1
        alias                   Linux Server #1
        address                 localhost                      ; i try the
ip server and not work
        check_command           check-host-alive
        max_check_attempts      10
        notification_interval   480
        notification_period     24x7
        notification_options    d,u,r
        }

the another check services it works only this not work

Service State Information
                  Current Status:   UNKNOWN
                  Status Information: /bin/ping -n -U -c 5 localhost
                  Current Attempt: 1/3
                  State Type: HARD
                  Last Check Type: ACTIVE
                  Last Check Time: 11-11-2002 12:00:11
                  Status Data Age: 0d 0h 10m 26s
                  Next Scheduled Active Check:   11-11-2002 12:20:11
                  Latency: < 1 second
                  Check Duration: < 1 second
                  Last State Change: 10-11-2002 02:49:58
                  Current State Duration: 1d 9h 20m 39s
                  Last Service Notification: N/A
                  Current Notification Number: 0
                  Is This Service Flapping? N/A
                  Percent State Change: N/A
                  In Scheduled Downtime?   NO
                  Last Update: 11-11-2002 12:10:24


the ping

Host State Information
                  Host Status:   DOWN
                  Status Information: /bin/ping -n -U -c 1 localhost
                  Last Status Check: 11-11-2002 12:10:09
                  Status Data Age: 0d 0h 0m 56s
                  Last State Change: 11-11-2002 12:01:09
                  Current State Duration: 0d 0h 9m 56s
                  Last Host Notification: 11-11-2002 12:01:09
                  Current Notification Number:   1
                  Is This Host Flapping? N/A
                  Percent State Change: N/A
                  In Scheduled Downtime?   NO
                  Last Update: 11-11-2002 12:10:54


the server

=0?

Juan Simao



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list