Page 1 of 2

enable_environment_macros not working

Posted: Mon Jan 12, 2015 7:03 pm
by mrbalky
Howdy,

This Nagios 3.5.1 on Ubuntu 14.04.

I am working with a customer of my company, and they are having trouble with environment macros not being passed to service checks and notification commands.

They have enable_environment_macros=1 and use_large_installation_tweaks=0. I have ginned up a simple service check that dumps the environment to a file and can confirm that the NAGIOS_... variables are missing.

Part of the difficulty for me, of course, is that I don't have direct access to this customer's Nagios host <sad face>.

I'm pretty stumped here; is there any other configuration setting, or any other gotcha that I don't know about that would cause these environment variables to be missing in checks and notifications?

Thanks,
Charlie

Re: enable_environment_macros not working

Posted: Tue Jan 13, 2015 11:24 am
by bdgoecke
How was Nagios Installed ?

Re: enable_environment_macros not working

Posted: Wed Jan 14, 2015 1:41 pm
by mrbalky
AFAIK (it's a customer of ours, so not 100% sure) it was installed simply with apt-get from archive.ubuntu.com.

Re: enable_environment_macros not working

Posted: Wed Jan 14, 2015 2:06 pm
by bdgoecke
Okay, I am going to try the apt-get install of nagios on ubuntu 14.04 and test it out.

Re: enable_environment_macros not working

Posted: Thu Jan 15, 2015 3:34 pm
by bdgoecke
mrbalky,

Have you tried turning on/up the debugging in the /etc/nagios3/nagios.cfg ?

These setting below are really chatty so you probably just want to turn them on while a check runs, and when you run your test(s).

Code: Select all

debug_level=-1
debug_verbosity=2
debug_file=/var/log/nagios3/nagios.debug
max_debug_file_size=5000000
Could we see the nagios.cfg ?
And if possible any log/debug files ?

==>brian

Re: enable_environment_macros not working

Posted: Fri Jan 16, 2015 10:23 am
by mrbalky
Thanks for looking at this Brian.

The nagios.cfg (attached) file looks pretty vanilla to me.

I am not sure I will be able to get debugging turned up. As you can see they use Puppet to manage nagios.cfg, and the person I'm dealing with didn't have authority to change it. (Though in some ways that might make it easier, since puppet would revert any changes he makes.) We've also lost the customer over this, and I'm not sure how much more he's willing to devote to debugging this.

But I will try!

Thanks again,
Charlie

Re: enable_environment_macros not working

Posted: Fri Jan 16, 2015 3:06 pm
by abrist
This is odd. If you get a chance, run bdgoecke's command and post the debug, that should help us help you help them :P

Re: enable_environment_macros not working

Posted: Fri Jan 16, 2015 3:12 pm
by mrbalky
I agree, it's really odd.

I'll see what I can do.

Whatever happens, thanks for looking at this.

Re: enable_environment_macros not working

Posted: Mon Jan 19, 2015 2:46 pm
by abrist
No problem. When you get a debug out, post it here in code wraps or attached.

Re: enable_environment_macros not working

Posted: Thu Jan 29, 2015 4:45 pm
by mrbalky
Well, we seem to have lost this fish. I've heard nothing from him since. If he ever comes back, I'll repost, but looks like it's over for now.

I want to thank you again abrist and bdgoecke.

- C