enable_environment_macros not working

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.
mrbalky
Posts: 5
Joined: Mon Jan 12, 2015 6:53 pm

enable_environment_macros not working

Post 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
bdgoecke
Posts: 36
Joined: Wed Oct 22, 2014 3:41 pm

Re: enable_environment_macros not working

Post by bdgoecke »

How was Nagios Installed ?
mrbalky
Posts: 5
Joined: Mon Jan 12, 2015 6:53 pm

Re: enable_environment_macros not working

Post by mrbalky »

AFAIK (it's a customer of ours, so not 100% sure) it was installed simply with apt-get from archive.ubuntu.com.
bdgoecke
Posts: 36
Joined: Wed Oct 22, 2014 3:41 pm

Re: enable_environment_macros not working

Post by bdgoecke »

Okay, I am going to try the apt-get install of nagios on ubuntu 14.04 and test it out.
bdgoecke
Posts: 36
Joined: Wed Oct 22, 2014 3:41 pm

Re: enable_environment_macros not working

Post 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
mrbalky
Posts: 5
Joined: Mon Jan 12, 2015 6:53 pm

Re: enable_environment_macros not working

Post 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
Attachments
nagios.cfg
nagios.cfg
(43.86 KiB) Downloaded 199 times
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: enable_environment_macros not working

Post 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
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.
mrbalky
Posts: 5
Joined: Mon Jan 12, 2015 6:53 pm

Re: enable_environment_macros not working

Post by mrbalky »

I agree, it's really odd.

I'll see what I can do.

Whatever happens, thanks for looking at this.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: enable_environment_macros not working

Post by abrist »

No problem. When you get a debug out, post it here in code wraps or attached.
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.
mrbalky
Posts: 5
Joined: Mon Jan 12, 2015 6:53 pm

Re: enable_environment_macros not working

Post 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
Locked