templates deleted after adding new monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dino
Posts: 15
Joined: Wed Mar 27, 2013 8:50 am

templates deleted after adding new monitoring

Post by dino »

Hi, any idea why the entries from templates after adding new monitoring service is deleted?

[root@localhost etc]# diff servicetemplates.cfg servicetemplates.cfg.bak
6c6
< # Date: 2015-02-01 11:28:56
---
> # Date: 2015-01-31 17:41:56
15,19d14
< define service {
< name nagiosgraph
< action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$
< register 0

-----------
after added new monitoring and restart service, the template entries added is deleted

[root@localhost etc]# diff servicetemplates.cfg servicetemplates.cfg.bak
6c6
< # Date: 2015-02-01 11:48:26
---
> # Date: 2015-01-31 17:41:56
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: templates deleted after adding new monitoring

Post by questrad »

Are you making changes directly in file?
If you use NagiosXI - you cannot do it, because NagisoXi will overwrite it after applying configuration.
You need to do changes only using web interface.

Can you confirm that you use only WEB interface for manipulating with template and service configuration?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: templates deleted after adding new monitoring

Post by scottwilkerson »

questrad wrote:Are you making changes directly in file?
If you use NagiosXI - you cannot do it, because NagisoXi will overwrite it after applying configuration.
You need to do changes only using web interface.

Can you confirm that you use only WEB interface for manipulating with template and service configuration?
questrad is correct, you need to make changes to the service templates in the CCM as this file is overwritten every time configuration is applied.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
dino
Posts: 15
Joined: Wed Mar 27, 2013 8:50 am

Re: templates deleted after adding new monitoring

Post by dino »

ok thanks for the info,

yes im directly editing fromt the file. Thanks again
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: templates deleted after adding new monitoring

Post by abrist »

If you wish manually edit your configuration, you must use the "static" directory as the other directories are controlled by the the CCM. There are actually very few reasons to use the static directory as most options can and should be edited using the CCM. If you have a specific use case that the CCM does not apply to, let us know. Otherwise, stick to the CCM.
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.
Locked