I have cloned my very large nagios production environment into a dev environment, and I have disabled notifications universally in dev.
However, I need to test my new config's and notification types but without actually sending legit problems from the dev nagios server.
Without picking through and removing or changing my notification contacts for everything, can I selectively send notifications to myself somehow without triggering alerts to to real people?
Does a host definition "notifications_enabled=yes" override the nagios "enable_notification=(no)" ?
Safely testing notifications from 2nd nagios host
Re: Safely testing notifications from 2nd nagios host
It does not.mleo40 wrote: Does a host definition "notifications_enabled=yes" override the nagios "enable_notification=(no)" ?
Not that I can think of off the top of my head, unfortunately. Would the bulk modification tool work for you?mleo40 wrote: Without picking through and removing or changing my notification contacts for everything, can I selectively send notifications to myself somehow without triggering alerts to to real people?
Former Nagios Employee.
me.
me.
Re: Safely testing notifications from 2nd nagios host
I don't know what that is, and is it available for core 4.1.1?
Re: Safely testing notifications from 2nd nagios host
That's my mistake. For some reason I thought I was posting in the XI forum. It's not available in Core. Being that this is core though, it may be pretty easy to whip up a sedcommand or two to clean this up for you. We could just bulk change notifications enabled to 0 instead of 1, and then manually fix the ones you're interested in.mleo40 wrote: I don't know what that is, and is it available for core 4.1.1?
Does that make sense? Again, sorry for the confusion.
Former Nagios Employee.
me.
me.
Re: Safely testing notifications from 2nd nagios host
no worries...thanks for replying.
if it's not possible this thread can be closed out.
if it's not possible this thread can be closed out.
Re: Safely testing notifications from 2nd nagios host
Well, it depends on what you mean by not possible.
Would change turn notifications off in the file templates.cfg for instance 
Code: Select all
sed -i 's/notifications_enabled.*1/notifications_enabled\t\t\t0/g' templates.cfg
Former Nagios Employee.
me.
me.
Re: Safely testing notifications from 2nd nagios host
Possible with regards to not undoing all my existing config's, or via some easy "built-in" tool.
Everything is possible with the right shell command!
But that solution requires there to be an existing line item for each template already, which I don't.
However...that does give me a path forward. thanks!
Everything is possible with the right shell command!
But that solution requires there to be an existing line item for each template already, which I don't.
However...that does give me a path forward. thanks!
Re: Safely testing notifications from 2nd nagios host
Hopefully it helps, would you like this locked at this point?
Former Nagios Employee.
me.
me.