Page 2 of 2

Re: CGI Error created by "enable_environment_macros=1"

Posted: Wed Jul 15, 2015 7:39 am
by uragusan
We have possibly found the source of the issue.
Our old .cfg Files have in the host definition empty customer fields.

for example…

Code: Select all

define host{
		use						linux-server
		host_name				localhost
		alias					localhost
		address					127.0.0.1
		notes					$_HOSTCUSTOMER001$ $_HOSTCUSTOMER002$ $_HOSTCUSTOMER003$ $_HOSTCUSTOMER004$ $_HOSTCUSTOMER005$
		notes_url				http://websitename
		icon_image				logo_axis_40x40.png
		statusmap_image			Icon.png
		register				1
		#							<br>
		_customer001				Location: Germany, Berlin<br>
		_customer002
		_customer003
		_customer004				<a href="http://websitename/Service1">Servicename1</a><br>
		_customer005				<a href="https://websitename/Service2">Servicename2</a><br>
		}
I don’t know why empty fields are in the config files, there comes from Nagios 2 installation. Nagios 3.2.3 have no problem with this. I have tried to delete there in a small Configuration, after that "enable_environment_macros=1"make no more problems. I will implement this for all our .cfg Files.

Re: CGI Error created by "enable_environment_macros=1"

Posted: Wed Jul 15, 2015 9:27 am
by jolson
uragusan,

That sounds like a good plan - let us know the results. Thanks!

Re: CGI Error created by "enable_environment_macros=1"

Posted: Thu Jul 16, 2015 9:02 am
by uragusan
I have corrected all .cfg Files, now all works very fine.
Thanks very much to all who tries to help me.
Have anyone idea why Nagios 4 have this problem.

Re: CGI Error created by "enable_environment_macros=1"

Posted: Thu Jul 16, 2015 2:46 pm
by tmcdonald
Not sure why this would be an issue in Nagios 4. Would you like to open a bug report for it?

https://github.com/NagiosEnterprises/nagioscore

File an issue with a name like "[Bug] Empty variable macro leads to broken CGI" and our devs will be able to take a look into it.

If you don't want to file a bug or don't have a GitHub account, let me know and I can file it for you.

Re: CGI Error created by "enable_environment_macros=1"

Posted: Fri Jul 17, 2015 1:50 am
by uragusan
I don't have a GitHub account, I would be very grateful if you would describe this bug.

Re: CGI Error created by "enable_environment_macros=1"

Posted: Fri Jul 17, 2015 1:27 pm
by tmcdonald
I will certainly do so. Are we clear to close this thread in the meantime?

Re: CGI Error created by "enable_environment_macros=1"

Posted: Mon Jul 20, 2015 2:55 am
by uragusan
Yes, can be closed.
thanks.

Re: CGI Error created by "enable_environment_macros=1"

Posted: Mon Jul 27, 2015 3:15 pm
by tmcdonald