Free variables don't stay in uppercase after save

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dacaron
Posts: 9
Joined: Mon Nov 26, 2018 2:00 pm

Free variables don't stay in uppercase after save

Post by dacaron »

Since the update to Nagios XI 5.6 , I seem to be having issue with the free variables.

I use free variables in hosts config to set the value of some service checks, but since the update to Nagios XI 5.6 It no longer works.
ex:
I save them as _CURLOADCRIT & _CURLOADWARN but when I save and look at the config they appear as _curloadcrit & _curloadwarn.

Since this, the value I set in the host free variables aren't used for the service.

define host {
host_name host1
use hosttemplate1
alias host1
address 127.0.0.1
hostgroups hostgroup1
_curloadcrit 6,5,4
_curloadwarn 5,4,3
register 1
}

define service {
service_description Current Load
use servicetemplate1
hostgroup_name hostgroup1
display_name Current+Load
check_command check_nrpe_args!check_load!$_HOSTCURLOADWARN$!$_HOSTCURLOADCRIT$!!!!!
first_notification_delay 15
notification_period 24x7
register 1
}
User avatar
swolf
Developer
Posts: 299
Joined: Tue Jun 06, 2017 9:48 am

Re: Free variables don't stay in uppercase after save

Post by swolf »

Hi @dacaron

This issue is a little bit strange. To my knowledge, free variable names should be case-insensitive in the config (though upper-case is still required in the macro text).

Just to rule some things out, would you be able to edit your configuration manually (on the filesystem), so that your host config looks like

Code: Select all

define host {
host_name host1
use hosttemplate1
alias host1
address 127.0.0.1
hostgroups hostgroup1
_CURLOADCRIT 6,5,4
_CURLOADWARN 5,4,3
register 1
}
restart Nagios Core,

Code: Select all

service nagios restart
and verify whether your issue persists? We'll also be looking into this on our end.

EDIT:

We just checked this internally (both with the service added directly to the host and with both of them applied via a hostgroup) and didn't run into your issue. What version did you upgrade from?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy
dacaron
Posts: 9
Joined: Mon Nov 26, 2018 2:00 pm

Re: Free variables don't stay in uppercase after save

Post by dacaron »

Hi @swolf,

thank you for the quick answer. I forced a write config, and the config ends up looking like this

define host {
host_name host1
use hosttemplate1
alias host1
address 127.0.0.1
hostgroups hostgroup1
_CURLOADCRIT 6,5,4
_CURLOADWARN 5,4,3
register 1
}

So it seems the issue isn't related to the variables being in lowercase.

I did the update from 5.5.11 to 5.6.0.

I tested so more and it look like the value I set for the variables in the host config are not being use by the service check.
dacaron
Posts: 9
Joined: Mon Nov 26, 2018 2:00 pm

Re: Free variables don't stay in uppercase after save

Post by dacaron »

Nevermind,

You can consider this issue resolved, It was entirely on my end. The same day I did the NagiosXI, a new set of nrpe commands was pushed by ansible to all of our linux hosts and it included a new check_load command that forced warning and critical values :? .

I am really sorry for the wasted time.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Free variables don't stay in uppercase after save

Post by ssax »

Glad your issue is resolved! Locking and marking as resolved.

Thank you!
Locked