Safely testing notifications from 2nd nagios host

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
mleo40
Posts: 37
Joined: Tue Jan 27, 2015 10:21 pm

Safely testing notifications from 2nd nagios host

Post by mleo40 »

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)" ?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Safely testing notifications from 2nd nagios host

Post by hsmith »

mleo40 wrote: Does a host definition "notifications_enabled=yes" override the nagios "enable_notification=(no)" ?
It does not.
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?
Not that I can think of off the top of my head, unfortunately. Would the bulk modification tool work for you?
Former Nagios Employee.
me.
mleo40
Posts: 37
Joined: Tue Jan 27, 2015 10:21 pm

Re: Safely testing notifications from 2nd nagios host

Post by mleo40 »

I don't know what that is, and is it available for core 4.1.1?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Safely testing notifications from 2nd nagios host

Post by hsmith »

mleo40 wrote: I don't know what that is, and is it available for core 4.1.1?
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.

Does that make sense? Again, sorry for the confusion.
Former Nagios Employee.
me.
mleo40
Posts: 37
Joined: Tue Jan 27, 2015 10:21 pm

Re: Safely testing notifications from 2nd nagios host

Post by mleo40 »

no worries...thanks for replying.

if it's not possible this thread can be closed out.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Safely testing notifications from 2nd nagios host

Post by hsmith »

Well, it depends on what you mean by not possible.

Code: Select all

sed -i  's/notifications_enabled.*1/notifications_enabled\t\t\t0/g' templates.cfg
Would change turn notifications off in the file templates.cfg for instance :)
Former Nagios Employee.
me.
mleo40
Posts: 37
Joined: Tue Jan 27, 2015 10:21 pm

Re: Safely testing notifications from 2nd nagios host

Post by mleo40 »

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!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Safely testing notifications from 2nd nagios host

Post by hsmith »

Hopefully it helps, would you like this locked at this point?
Former Nagios Employee.
me.
Locked