Page 1 of 1
service retry_interval question
Posted: Mon Jun 20, 2016 5:20 am
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
Re: service retry_interval question
Posted: Mon Jun 20, 2016 12:10 pm
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
Re: service retry_interval question
Posted: Tue Jun 21, 2016 4:00 am
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)
Re: service retry_interval question
Posted: Tue Jun 21, 2016 11:04 am
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?
Re: service retry_interval question
Posted: Mon Jun 27, 2016 4:44 am
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
}
Re: service retry_interval question
Posted: Mon Jun 27, 2016 10:25 am
by lmiltchev
All these services use the "network-service" template.
use network-service
Can you show us the template's config?