Service settings vs template

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
DennisPR
Posts: 149
Joined: Mon May 07, 2012 10:34 am

Service settings vs template

Post 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
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Service settings vs template

Post by ssax »

Are you trying to modify the files in-place or are you doing it through the CCM?
DennisPR
Posts: 149
Joined: Mon May 07, 2012 10:34 am

Re: Service settings vs template

Post by DennisPR »

CCM
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Service settings vs template

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Service settings vs template

Post 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.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked