CGI Error created by "enable_environment_macros=1"

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
uragusan
Posts: 12
Joined: Wed Jul 08, 2015 4:02 am

Re: CGI Error created by "enable_environment_macros=1"

Post 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.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: CGI Error created by "enable_environment_macros=1"

Post by jolson »

uragusan,

That sounds like a good plan - let us know the results. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
uragusan
Posts: 12
Joined: Wed Jul 08, 2015 4:02 am

Re: CGI Error created by "enable_environment_macros=1"

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: CGI Error created by "enable_environment_macros=1"

Post 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.
Former Nagios employee
uragusan
Posts: 12
Joined: Wed Jul 08, 2015 4:02 am

Re: CGI Error created by "enable_environment_macros=1"

Post by uragusan »

I don't have a GitHub account, I would be very grateful if you would describe this bug.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: CGI Error created by "enable_environment_macros=1"

Post by tmcdonald »

I will certainly do so. Are we clear to close this thread in the meantime?
Former Nagios employee
uragusan
Posts: 12
Joined: Wed Jul 08, 2015 4:02 am

Re: CGI Error created by "enable_environment_macros=1"

Post by uragusan »

Yes, can be closed.
thanks.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: CGI Error created by "enable_environment_macros=1"

Post by tmcdonald »

Former Nagios employee
Locked