Template changes get lost after netxmsd restart

Started by blazarov, April 12, 2019, 11:59:40 AM

Previous topic - Next topic

blazarov

Hello,
recently i noticed that changes that we make on the templates get somehow lost after netxmsd restart.
This is extremely annoying, mostly because of the wasted time in fine tuning stuff.  >:(

Anyone faced that?
Any ideas on how to approach troubleshooting it?

Victor Kirhenshtein

Hi,

if those were standard templates then likely they were re-imported on startup. If this is the case set server configuration variable ImportConfigurationOnStartup to false. In 2.2.14 we changed that logic to only import missing templates and events by default.

Best regards,
Victor

blazarov

Hi,
yes i noticed it initially on the standard templates - Operating System -> General UNIX and Linux
but before submitting the thread i tried it on one custom template that we created and it did the same thing.

I will try your suggestion and revert.
Thanks!

Victor Kirhenshtein

Custom templates should not be affected by that setting. If they do it likely means that template is not saved to database. Check that you do not have any SQL errors in server log and if database table "items" contains changes for your custom template.

Best regards,
Victor

blazarov

Tested setting ImportConfigurationOnStartup to false. Fixed the problem with the default templates in the operating systems, but the problem with my custom template remains the same. It gets overwritten after server restart.
will try to see if it gets written to the database.

blazarov

i have done some testing observing directly the DB and i think i got it.
Depending on server load i get anything between 1 and 5 minutes for the change in the template to get populated in the DB. I believe this is normal due to the DB writer queue which is usually at around 4k.

My initial test was quite quickly changing the template and immediately stopping the server. Most probably i didnt allow it enough time to get flushed from the DB queue and populated to the DB.

I think i am sorted now. Thanks again!