Hi,
I'm using a custom variable to store a value relative to a service. I've defined the CV using the Nagios XI graphical interface.
Using the command 'CHANGE_CUSTOM_SVC_VAR' I'm able to change the value and to recover it with the macro $_SERVICENAMEOFCV$ correctly.
However if from the graphical interface I perform an 'Apply Configuration' action the CV values is overwritten to the default value.
I didn't expect this behavior and I'd like to maintain the new value set using the 'CHANGE_CUSTOM_SVC_VAR' command.
Is it a bug?
P.S.: I've tried both defining the CV at a service level and defining the CV in a service template inherited by the service, with the same result described before.
Regards,
Francesco
issue with custom variables
Re: issue with custom variables
The data that is stored in the CCM is in a database, and when you click Apply Config this gets written out to disk and the nagios process is restarted. The CHANGE_CUSTOM_SVC_VAR command changes things in-memory, so a restart is going to revert back to whatever is in the file, and therefor the CCM. Try issuing that command and then run a service nagios restart - the variable should revert.
Former Nagios employee