Host Templates - Custom Variables not saving properly

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Host Templates - Custom Variables not saving properly

Post by rajasegar »

Nagios XI 2012R2.9
RHEL 6.5 x64
Manual Install

I am having problem with saving custom variables in CCM->Templates->Host Templates
The same problem happens when adding to generic-host or new host template.

Variable Name Variable Definition
down_email 1
down_rec_email 1
down_sms 0
down_rec_sms 0

Only the first 2 entries in being saved. I tried other variables but still same problem
Also tried starting variables names with _ still same problem.
Can someone please advice on this?

Thanks
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Host Templates - Custom Variables not saving properly

Post by rajasegar »

I noticed that it is not saving for any variable that has 0 as the variable definition.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Host Templates - Custom Variables not saving properly

Post by lmiltchev »

I can confirm this behavior - not sure if this is a bug or "by design". Will have to discuss it with our developers. In any case, I will be filing an internal bug report. If it is a bug, I expect it to be fixed in one of our future releases.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Host Templates - Custom Variables not saving properly

Post by rajasegar »

It is definitively a bug, since 0 works fine in Nagios Core.
I have changed all the 1 to true and 0 to false as a workaround for this.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Host Templates - Custom Variables not saving properly

Post by tmcdonald »

Also confirmed on my end, for things other than templates, too. And good workaround with the true/false.

Since there is a bug report for this and you have a temp fix, I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked