Page 1 of 1

Check_Ping help me

Posted: Thu Oct 20, 2016 10:57 am
by fboquet
hi Guy, ( i'm a frensh guy so ... sorry for my bad english :roll: )

I need your help, I can't understand how the check_ping work.

I would like 5 ping every 10 second, it's for put my routers under supervision when a customer call me for a problem network.

Can you help me ?

Host in my template file :

Code: Select all

define host{
         name                             router-celeste  
         use                                generic-host    
         check_period                  24x7            
         check_interval                0.5               
         retry_interval                  1               
         max_check_attempts      10              
         check_command             check-host-alive        
         notification_period            24x7          
         notification_interval          30            
         notification_options          d,r            
         contact_groups                admins        
         register                            0               
         }
And host files :

Code: Select all

define host{
    use         router-celeste          
    host_name   SQTestNagios           
    alias       SQ4 Test support      
    address     83.142.xx.46          
    hostgroups  Router-ADSL

}

define service{
    use                         generic-service
    host_name                   SQTestNagios
    service_description         PING
    check_command               check_ping!100.0,20%!500.0,80% -p 5
   }
my nagios.cfg : (just what I modified)

Code: Select all

# STATUS FILE UPDATE INTERVAL
#status_update_interval=10
status_update_interval=5

#max_check_result_reaper_time=30
max_check_result_reaper_time=5

#auto_rescheduling_interval=30
auto_rescheduling_interval=15


##############DEFAULT CONFIG########################
#service_check_timeout=50
#host_check_timeout=30
#event_handler_timeout=30
#notification_timeout=30
#ocsp_timeout=5
#perfdata_timeout=5
####################################################

#########CELESTE CONFIG#############################
service_check_timeout=20
host_check_timeout=5
event_handler_timeout=1
notification_timeout=1
ocsp_timeout=5
perfdata_timeout=5
#####################################################

# INTERVAL LENGTH
# This is the seconds per unit interval as used in the
# host/contact/service configuration files.  Setting this to 60 means
# that each interval is one minute long (60 seconds).  Other settings
# have not been tested much, so your mileage is likely to vary...

#interval_length=60
interval_length=10

The result is that I get ping like this :

(5ping) :) --> (9-10s) :? --> (5ping) :D --> (2s) :shock: --> (12ping) :lol: --> (4s) :?: etc. I have the impression that is ... random ... or i don't understand the cycle.

thank you for your support ;)

Re: Check_Ping help me

Posted: Thu Oct 20, 2016 2:07 pm
by rkennedy
(5ping) :) --> (9-10s) :?
(5ping) :D --> (2s) :shock:
(12ping) :lol: --> (4s) :?:
etc. I have the impression that is ... random ... or i don't understand the cycle.
The scheduling system will automatically order the checks / timing based off of what all is running on the system. There will always be a difference, especially when you get down to such a low interval_length and check_interval. The results you're seeing are to be expected.

If things are this critical as well, I would look at using check_tcp against an open port vs ICMP as it will be a bit more accurate.

Re: Check_Ping help me

Posted: Fri Oct 21, 2016 2:27 am
by fboquet
Thank you for the answer, and I understand a little better the operation, however, I have juste one host configured on my nagios, That's why I did not include these of ping spreads. :roll:

With which line-commande should I must play to manage and ping time between ping (Check) ?? :?

Re: Check_Ping help me

Posted: Fri Oct 21, 2016 9:44 am
by rkennedy
There isn't a way due to the scheduling I just mentioned, you could try changing things even lower, but you will continue to see the different timing.

Going this low with your interval_length, and check_interval isn't something we recommend.