Page 1 of 1

templates deleted after adding new monitoring

Posted: Sat Jan 31, 2015 10:57 pm
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

Re: templates deleted after adding new monitoring

Posted: Sun Feb 01, 2015 3:00 pm
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?

Re: templates deleted after adding new monitoring

Posted: Sun Feb 01, 2015 10:30 pm
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.

Re: templates deleted after adding new monitoring

Posted: Mon Feb 02, 2015 5:27 am
by dino
ok thanks for the info,

yes im directly editing fromt the file. Thanks again

Re: templates deleted after adding new monitoring

Posted: Mon Feb 02, 2015 9:39 am
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.