Page 1 of 1

nagios status incorrect

Posted: Wed Jul 23, 2014 9:31 am
by Kiara
Hello, I have a small problem here but no one is able to find out the cause so I had to write here.
I am trying to ping Windows servers from Nagios but its shows status down in Web interface but if I ping it from shell it says okay:

Code: Select all

 /usr/local/nagios/libexec/check_ping -H 10.12.60.31 -w 100.0,20% -c 200.0,40%
PING OK - Packet loss = 0%, RTA = 0.52 ms|rta=0.521000ms;100.000000;200.000000;0.000000 pl=0%;20;40;0
Below is the input of Configuration file:

Code: Select all

define host{
        use             windows-server          ; Inherit default values from a template
        host_name       RDS2                    ;The name we're giving to this host
        alias           Windows 2012 Remote Apps     ; A longer name associated with the host
        address         10.20.60.31             ; IP address of the host
        }

define hostgroup{
        hostgroup_name  windows-servers                ; The name of the hostgroup
        alias           RDP Servers        ; Long name of the group
        }

define service{
        use                     generic-service ; Inherit values from a template
        host_name               RDS2   ; The name of the host the service is associated with
        service_description     PING            ; The service description
        check_command           check_ping!200.0,20%!600.0,60%  ; The command used to monitor the service
        normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
        retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
        }

Re: nagios status incorrect

Posted: Wed Jul 23, 2014 4:39 pm
by lmiltchev
The IP address that is in your host definition (10.20.60.31) is different than the one that you used in the CLI (10.12.60.31)...

Re: nagios status incorrect

Posted: Thu Jul 24, 2014 6:50 am
by Kiara
Thanks for the reply. I am sure no one ask dumb question like this but my frustration didnt let me see the wrong ip. you still saved a lot of time and head banging so thanks again.
Its okay to close.