Random emails

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.
Locked
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Random emails

Post by abrist »

JohnFLi wrote:put the notify host back in the template, restarted the host, got a bogus email
This is because the notify command uses the $CONTACTEMAIL$ macro. This macro is populated by a contact object, not a host. So when the notify command is called from a host object, it cannot populate the macro, which usually ends up as a "$" in the shell command instead of an email address. Notification handlers should only be set on contact objects/templates.

Cheers!
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.
Locked