Page 1 of 1

retry-interval seems not working in my configuration

Posted: Wed Apr 12, 2017 10:32 pm
by source888
Hello,There

In my nagios core installation , recently i found that the retry-interval seems not working ,eg ,for server 'QX1' , i intended to set it as 1 min ,but actually in the log ,i see its 5 min between each check ,i check google and also this forum ,but haven't found why ,can you help to check,thanks .

real server 'QX1' ,use template 'pi-server'

template 'pi-server' ,use template 'generic-host'
check_interval 10
retry_interval 1
max_check_attempts 5

template 'generic-host'
retry_interval 3
max_check_attempts 3

From the following log ,i see the retry-interval is 5 min , not the 1 min as wanted .

nagios-03-06-2017-00.log:[1488668959] HOST ALERT: QX1;DOWN;SOFT;1;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-06-2017-00.log:[1488669262] HOST ALERT: QX1;DOWN;SOFT;2;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-06-2017-00.log:[1488669562] HOST ALERT: QX1;DOWN;SOFT;3;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-06-2017-00.log:[1488669863] HOST ALERT: QX1;DOWN;SOFT;4;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-06-2017-00.log:[1488670162] HOST ALERT: QX1;DOWN;HARD;5;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-06-2017-00.log:[1488670464] HOST ALERT: QX1;UP;HARD;5;HTTP WARNING: HTTP/1.1 404 Not Found - 2122 bytes in 0.060 second response time
nagios-03-09-2017-00.log:[1488983853] HOST ALERT: QX1;DOWN;SOFT;1;HTTP CRITICAL: HTTP/1.0 503 Service Unavailable - 313 bytes in 0.065 second response time
nagios-03-09-2017-00.log:[1488984160] HOST ALERT: QX1;DOWN;SOFT;2;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-09-2017-00.log:[1488984521] HOST ALERT: QX1;UP;SOFT;3;HTTP WARNING: HTTP/1.1 404 Not Found - 2122 bytes in 0.046 second response time
nagios-03-13-2017-00.log:[1489273503] HOST ALERT: QX1;DOWN;SOFT;1;HTTP CRITICAL: HTTP/1.0 503 Service Unavailable - 313 bytes in 0.066 second response time
nagios-03-13-2017-00.log:[1489273806] HOST ALERT: QX1;DOWN;SOFT;2;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-13-2017-00.log:[1489274106] HOST ALERT: QX1;DOWN;SOFT;3;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-13-2017-00.log:[1489274406] HOST ALERT: QX1;DOWN;SOFT;4;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-13-2017-00.log:[1489274706] HOST ALERT: QX1;DOWN;HARD;5;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-13-2017-00.log:[1489275307] HOST ALERT: QX1;UP;HARD;5;HTTP WARNING: HTTP/1.1 404 Not Found - 2122 bytes in 0.024 second response time
nagios-03-20-2017-00.log:[1489878495] HOST ALERT: QX1;DOWN;SOFT;1;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-20-2017-00.log:[1489878803] HOST ALERT: QX1;DOWN;SOFT;2;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-20-2017-00.log:[1489879102] HOST ALERT: QX1;DOWN;SOFT;3;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-20-2017-00.log:[1489879402] HOST ALERT: QX1;DOWN;SOFT;4;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-20-2017-00.log:[1489879703] HOST ALERT: QX1;DOWN;HARD;5;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-20-2017-00.log:[1489880306] HOST ALERT: QX1;UP;HARD;5;HTTP WARNING: HTTP/1.1 404 Not Found - 2122 bytes in 0.024 second response time
nagios-03-22-2017-00.log:[1490123480] HOST ALERT: QX1;DOWN;SOFT;1;CRITICAL - Socket timeout
nagios-03-22-2017-00.log:[1490123852] HOST ALERT: QX1;UP;SOFT;2;HTTP WARNING: HTTP/1.1 404 Not Found - 2100 bytes in 0.012 second response time
nagios-03-27-2017-00.log:[1490483233] HOST ALERT: QX1;DOWN;SOFT;1;HTTP CRITICAL: HTTP/1.0 503 Service Unavailable - 313 bytes in 0.064 second response time
nagios-03-27-2017-00.log:[1490483543] HOST ALERT: QX1;DOWN;SOFT;2;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-27-2017-00.log:[1490483842] HOST ALERT: QX1;DOWN;SOFT;3;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-27-2017-00.log:[1490484141] HOST ALERT: QX1;DOWN;SOFT;4;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-27-2017-00.log:[1490484440] HOST ALERT: QX1;DOWN;HARD;5;connect to address qx1.qx1.com and port 58201: Connection refused
nagios-03-27-2017-00.log:[1490487441] HOST ALERT: QX1;UP;HARD;5;HTTP WARNING: HTTP/1.1 404 Not Found - 2122 bytes in 0.019 second response time

Re: retry-interval seems not working in my configuration

Posted: Thu Apr 13, 2017 1:36 pm
by mcapra
Can you share the full host/template definitions for each of the referenced objects?

Re: retry-interval seems not working in my configuration

Posted: Fri Apr 14, 2017 2:10 am
by source888
Hi,mcapra

Thanks for the reply :) ,as the full config file contains quite a lot server info , here are the host/host template defination relates to the server QX1

in piQ.cfg config file
-----------------

Code: Select all

define host{
        name                    pi-server       ; The name of this host template
        use                     generic-host    ; Inherit default values from the generic-host template
        check_interval          10
        retry_interval          1
        max_check_attempts      5
        check_command           check_pi_host_wo_nepp   ; Default command to check if servers are "alive"
        notification_interval   10080              ; Resend notifications every 30 minutes
        notification_options    d,r             ; Only send notifications for specific host states
        notification_period     EAI_24x7            ;
        contact_groups          EAI_pi
        contacts                *******
        register                0               ; DONT REGISTER THIS - ITS JUST A TEMPLATE
        }

		
		define host{
         use                     pi-server
         host_name               QX1
         alias                   QX1_URL_HERE
         address                 QX1_URL_HERE
         _pi_usr                 *******
         _pi_pwd                 *********
         _pi_port                58201
         _p4_port                58204
         _pi_sapctrl_port        58213
         }

in template.cfg config file
---------------

Code: Select all

define host{
        name                            generic-host    ; The name of this host template
        notifications_enabled           1               ; Host notifications are enabled
        notification_interval           0               ; Do not resend notifications
        notification_options            d,u,r           ; Only send notifications for specific host states
        event_handler_enabled           1               ; Host event handler is enabled
        flap_detection_enabled          1               ; Flap detection is enabled
        retain_status_information       1               ; Retain status information across program restarts
        retain_nonstatus_information    1               ; Retain non-status information across program restarts
        retry_interval                  3               ; Schedule host check retries at 3 minute intervals
        max_check_attempts              3               ; Check each host 3 times (max)
        contact_groups                  admins          ; Notifications get sent to the admins by default
        register                        0               ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}

Re: retry-interval seems not working in my configuration

Posted: Fri Apr 14, 2017 10:45 am
by mcapra
Which version of Nagios Core are you using? With that exact setup using Nagios Core 4.3.1, I am getting a 1 minute retry interval:

Code: Select all

[1492184422] HOST ALERT: QX1;DOWN;SOFT;2;check_dummy: Arguments to check_dummy must be an integer
[1492184481] HOST ALERT: QX1;DOWN;SOFT;3;check_dummy: Arguments to check_dummy must be an integer
[1492184539] HOST ALERT: QX1;DOWN;SOFT;4;check_dummy: Arguments to check_dummy must be an integer
[1492184599] HOST ALERT: QX1;DOWN;HARD;5;check_dummy: Arguments to check_dummy must be an integer

Re: retry-interval seems not working in my configuration

Posted: Sun Apr 16, 2017 8:29 pm
by source888
i am using nagios core 4.2.1

Current Network Status
Last Updated: Mon Apr 17 03:28:10 CEST 2017
Updated every 30 seconds
NagiosĀ® Coreā„¢ 4.2.1 - www.nagios.org

Re: retry-interval seems not working in my configuration

Posted: Mon Apr 17, 2017 11:58 am
by mcapra
Hmm, still unable to replicate it on a 4.2.1 machine:

Code: Select all

[1492447938] HOST ALERT: QX1;DOWN;SOFT;1;check_dummy: Arguments to check_dummy must be an integer
[1492447998] HOST ALERT: QX1;DOWN;SOFT;2;check_dummy: Arguments to check_dummy must be an integer
[1492448058] HOST ALERT: QX1;DOWN;SOFT;3;check_dummy: Arguments to check_dummy must be an integer
[1492448118] HOST ALERT: QX1;DOWN;SOFT;4;check_dummy: Arguments to check_dummy must be an integer
[1492448178] HOST ALERT: QX1;DOWN;HARD;5;check_dummy: Arguments to check_dummy must be an integer
Can you share your full objects.cache file? It's typically located here:

Code: Select all

/usr/local/nagios/var/objects.cache

Re: retry-interval seems not working in my configuration

Posted: Tue Apr 25, 2017 4:28 am
by source888
Hello,Mcapra

Sorry for the late response ,thanks but as the whole file contain quite a lot server info of our company ,i can't provide it by company's security policy. Here's the QX1 defination in this file .

Can you hint me some clue to find out the reason ,maybe then i can try first to check myself.

define host {
host_name QX1
alias qx1.server.xx.com
address qx1.server.xx.com
check_command check_pi_host_wo_nepp
contacts gom999
contact_groups EAI_pi
notification_period EAI_24x7
initial_state o
importance 0
check_interval 10.000000
retry_interval 1.000000
max_check_attempts 5
active_checks_enabled 1
passive_checks_enabled 1
obsess 1
event_handler_enabled 1
low_flap_threshold 0.000000
high_flap_threshold 0.000000
flap_detection_enabled 1
flap_detection_options a
freshness_threshold 0
check_freshness 0
notification_options r,d
notifications_enabled 1
notification_interval 10080.000000
first_notification_delay 0.000000
stalking_options n
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
_PI_USR QX0_NAGIOS
_PI_PWD *******
_PI_PORT 58201
_P4_PORT 58204
_PI_SAPCTRL_PORT 58213
}

Re: retry-interval seems not working in my configuration

Posted: Tue Apr 25, 2017 2:51 pm
by avandemore
Can you attach nagios.cfg? That may provide some clues.