service retry_interval question

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
grum1965
Posts: 3
Joined: Mon Oct 20, 2014 3:24 am

service retry_interval question

Post by grum1965 »

Could anyone please tell me the effect on the checks if either of the following conditions are true for a Service (NAGIOS CORE v3.5.1)?

1) The retry_interval is set to 0
2) The retry_interval is set NULL

Thanks in advance
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: service retry_interval question

Post by lmiltchev »

The "retry_interval" directive is used to define the number of "time units" to wait before scheduling a re-check of the service. Using a value of "0" or "NULL" doesn't make sense, and your configuration *should* fail. Do you see any errors when you check your configuration?

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
grum1965
Posts: 3
Joined: Mon Oct 20, 2014 3:24 am

Re: service retry_interval question

Post by grum1965 »

I've just joined a new employer and have been looking through their database and configs. It didn't make sense to me either. The 'zero' and 'NULL' values are the database entries. I ran a manual verify and it brought up no errors (there were over 900 'warnings' about other parts of the config though). I thought I would 'sense check' with you guys first.

On deeper investigation it appears that the database entries are written out to configs using their own 'make and reload' script. All the 'zero' and 'NULL' value rows are ignored and therefore the 'retry_interva'l doesn't exist in the written configs for alot of their Service Definitions. Again just sounding you all out, as this is deemed a mandatory field, how does it affect the Nagios engine and alerting by not having it in the definition at all?

(Happily the other 900+ warnings that I spotted are easily resolved with one blanket change)
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: service retry_interval question

Post by lmiltchev »

All the 'zero' and 'NULL' value rows are ignored and therefore the 'retry_interva'l doesn't exist in the written configs for alot of their Service Definitions. Again just sounding you all out, as this is deemed a mandatory field, how does it affect the Nagios engine and alerting by not having it in the definition at all?
Again, these fields are mandatory and having a "0" or "NULL" should cause configuration to fail. Are you sure that these values are not in fact inherited from a template? Can you show us an example of a service definition, along with all relevant templates?
Be sure to check out our Knowledgebase for helpful articles and solutions!
grum1965
Posts: 3
Joined: Mon Oct 20, 2014 3:24 am

Re: service retry_interval question

Post by grum1965 »

Here is small section from the services.cfg that is in use. You can see that there are a couple of other mandatory fields that are missing from some definitions...

Code: Select all

define service {
        use network-service
        service_description AphidGwOldJobs
        hostgroups AphidGwOldJobs
        check_command check_aphidgw_old_jobs!xxxxxxxxxxx!:5
        notes check_snmp -H $HOSTADDRESS$ -o.1.3.6.1.4.1.2021.250.1.2  -C xxxxxxxxxxx -c :5
        passive_checks_enabled 1
        }

define service {
        use network-service
        service_description AphidGwQueue
        hostgroups AphidGwQueue
        check_command check_aphidgw_queue!xxxxxxxxxxx!:5!:50
        notes check_snmp -H $HOSTADDRESS$ -o.1.3.6.1.4.1.2021.250.1.1  -C xxxxxxxxxxx -w :5 -c :50
        passive_checks_enabled 1
        }

define service {
        use network-service
        service_description AphidIP
        hostgroups AphidIP
        check_command check_hi_db!aphid_ip
        notes check_hi_db aphid_ip
        check_interval 120
        notification_interval 120
        }

define service {
        use network-service
        service_description AphidNAS
        hostgroups AphidNAS
        check_command check_aphid!xxxapi
        notes check_aphid.plx -H $HOSTADDRESS$ -A xxxapi
        check_interval 5
        notification_interval 5
        passive_checks_enabled 1
        retry_interval 5
        }

define service {
        use network-service
        service_description AphidVz
        hostgroups AphidVz
        check_command check_aphid!xxapi
        notes check_aphid.plx -H $HOSTADDRESS$ -A xxapi
        passive_checks_enabled 1
        }

define service {
        use network-service
        service_description AutoFS
        hostgroups AutoFS
        check_command check_automount!xxxxxxxxxxx!1:
        notes check_snmp -t 20 -H $HOSTADDRESS$ -C xxxxxxxxxxx -o .1.3.6.1.4.1.2021.2.1.5.20 -c 1:
        check_interval 5
        notification_interval 5
        passive_checks_enabled 1
        retry_interval 3
        }
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: service retry_interval question

Post by lmiltchev »

All these services use the "network-service" template.
use network-service
Can you show us the template's config?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked