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.
We have install Nagios 4.08 on Debian 8U1 with Apache 2.4.
For our notifications we use nagios_mail.php Script by Otto Berger that required to enable “enable_environment_macros“ in Nagios.cfg.
After activation we get the CGI error in Nagios-error.log.
The environment may be sooooo big that the cgi is timing out waiting for it to return. You may need to increase the apache TimeOut directive value: http://httpd.apache.org/docs/2.0/mod/core.html#timeout
This may cause issues with long waits with the core frontend though.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Hi abrist, thanks for the answer.
I have change timeout to 600 sec for testing. After forcing the Service check and wait followed, nothing happens, the check was not started and I have become same CGI error in the Logs.
On top command we do not see high CPU or RAM usage.
Nagios 3.2.3 in Productive Environment have not this big Problem.
Maybe apparmor or selinux is giving you some troubles?
I've had no issue when enabling envs on any of my many 4.x systems that I've setup, although I use strictly CentOS, and disabling selinux is the first thing I do.
Post the contents of /tmp/cgi_test.txt here in code wraps.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
This Command do not work with enabled environment macros, I get Log only if I set "enable_environment_macros=0".
Interesting too, nagios so as nagios.debug Logs are not more filed, after activated environment.
I'm not sure what broke for you, but if you don't have a lot of investment in the system already, I'd be happy to share my command history that got my system running. As a matter of fact I'll do it anyway.
I removed incorrect or unimportant lines for clarity's sake: