Since the update to Nagios XI 2026R1.5, it seems that free variables that contain a $ sign are not longer correctly replaced.
Example:
a host has this variable: _wmi_msas_name with value MSOLAP$HVWNLSQLTST
a service uses this as follows: check_ncpa.py ... -M 'windowscounters/$_HOSTWMI_MSAS_NAME$:Memory/Memory Usage KB'
In Nagios XI 2026R1.4, the windows counter was correct, in Nagios XI 2026R1.5, the $ sign is removed from the counter.
I tried to escape it ($$, /$) but no success.
Any ideas?
$ sign in free variables
Re: $ sign in free variables
@nagios-retail,
Custom variable macros are now being stripped of dangerous characters due to security concerns. In /usr/local/nagios/etc/nagios.cfg, there is the illegal_macro_output_chars config option, which determines which characters are stripped from macros. If you want to use a $ sign in custom variable macros, edit the default option from `~$&|'"<> to `~&|'"<> and restart Core.
I'm sorry for any inconvenience this update may have caused and please let me know if you have any other questions.
- Emmett
Custom variable macros are now being stripped of dangerous characters due to security concerns. In /usr/local/nagios/etc/nagios.cfg, there is the illegal_macro_output_chars config option, which determines which characters are stripped from macros. If you want to use a $ sign in custom variable macros, edit the default option from `~$&|'"<> to `~&|'"<> and restart Core.
I'm sorry for any inconvenience this update may have caused and please let me know if you have any other questions.
- Emmett
Re: $ sign in free variables
Its probably best to not use unix reserved characters.