Page 1 of 1

Service settings vs template

Posted: Tue Mar 03, 2015 3:13 am
by DennisPR
Hi,

I want to override some template settings for 1 service. I thought that service settings overruled the template settings but it doesn't seem to work that way in Nagios XI 2014R2.6.
Here's my template setting :

Code: Select all

define service {
       name                          		my-service
       service_description           		My Service
       display_name                  		Mys Service
       max_check_attempts            		3
       check_interval                		10
       retry_interval                		5
       check_period                  		24x7
       notification_interval         		1440
       notification_period           		24x7
       notification_options          		w,c,r,
       register                    		0

}
I want to change the retry_interval and max_check_attempts for 1 service

Here's my service setting :

Code: Select all

define service {
	service_description		HP Switch : CPU
	use				my-service
	hostgroup_name			hp-switch
	check_command			check_snmp!-C public -o .1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0 -w 90 -c 95 -u % -l "5min cpu" !!!!!!!
	max_check_attempts		6
	register			1
	}	
I would suspect that the service goes in hard state and sends a mail after 6 retries in stead of 3 but it stil goes in hard state after 3 retries
switch.PNG

Re: Service settings vs template

Posted: Tue Mar 03, 2015 11:51 am
by ssax
Are you trying to modify the files in-place or are you doing it through the CCM?

Re: Service settings vs template

Posted: Wed Mar 04, 2015 3:48 am
by DennisPR
CCM

Re: Service settings vs template

Posted: Wed Mar 04, 2015 10:40 am
by abrist
Can you check the service definition in /usr/local/nagios/var/status.dat to how many check attempts are configured on the live config?

Re: Service settings vs template

Posted: Wed Mar 04, 2015 11:10 am
by jolson
I tested this on an XI box running the same version (2014R2.6) and could not reproduce your issue. I made all modifications through the CCM - after modifying the max_check_attempts on the service itself, soft state persisted until the very last check. Please try out the troubleshooting step abrist has supplied.