Create an escalation

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Create an escalation

Post by jkinning »

I might be over thinking this but I need to add an escalation to my hosts and services that are currently tied to a critical one contact group. We have a primary support person which we rotate weekly and the hosts and services that have been defined as critical notify member in the critical one contact group. Today this is a pager. We are trying to eliminate the pager and leverage SMS since just about all of us carry our cell phones around. There is a system we plan to use called ConnectAnywhere which will relay the message to the appropriate persons cell phone based on who is on-call that week. My dilemma is trying to figure out how to replace the current "pager" user that is in the critical one contact group and replace that with the cell phone user, "connectanywhere". I figured for this just remove the "pager" user and add the "connectanywhere" user. Then I need to setup an escalation so if after 30 minutes if the notification isn't acknowledged or remediated then the "pager" gets notified. This is the part I am trying to figure out how to do and get assigned to the same hosts and services I have for the critical one contact group.

Is it possible to create another group called critical two and in that group add the "pager" user. Create the escalation for after 30 minutes notify the critical two contact group? Is there an easy way to discover what host and services currently have notifications going to critical one contact group? Is there an easier way to do that?

I guess in the end we want to remove the "pager" user from receiving the initial notifications and have the "connectanywhere" user get them. If the "connectanywhere" user doesn't remediate the issue or acknowledge that alert then after 30 minutes the "pager" user will get notified.

I hope that is clear.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Create an escalation

Post by jdalrymple »

jkinning wrote:Is it possible to create another group called critical two and in that group add the "pager" user. Create the escalation for after 30 minutes notify the critical two contact group
No idea why that wouldn't be possible, although applying them to the appropriate stuffs might be tricky.
jkinning wrote:Is there an easy way to discover what host and services currently have notifications going to critical one contact group? Is there an easier way to do that?
If the contact can be isolated to 1 (or a few) contactgroups or contacts with a unique name (as in a contact named "localhost" or "check_http" won't work for you) this ugly 1 liner will grab some the data worth looking at:

Code: Select all

grep -Pzo "(?s)^define\s*?(host|service)\s*?{.*?(admins|nagiosadmin).*?}" /usr/local/nagios/var/objects.cache | grep -Po "(host_name|service_description).*"
Replace admins/nagiosadmin with whatever you need.
jkinning wrote:I guess in the end we want to remove the "pager" user from receiving the initial notifications and have the "connectanywhere" user get them. If the "connectanywhere" user doesn't remediate the issue or acknowledge that alert then after 30 minutes the "pager" user will get notified.
Understood. This is why we love the use of templates, it makes making these changes easier in the future. You will almost certainly be better serviced just changing your existing contact to do what you want then adding in the 2nd contact (escalation) in a more controlled fashion than to shift stuff around.
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Create an escalation

Post by jkinning »

When I run the grep command it is returning information but the contact and/or contact group I am looking for isn't tied to all the hosts and services that are returned. I have been trying to keep notifications tied to a contact group so I can modify contacts relatively easy.

There should be an easy way to see what contacts/contact groups are tied to what hosts, services, templates, etc.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Create an escalation

Post by lmiltchev »

There should be an easy way to see what contacts/contact groups are tied to what hosts, services, templates, etc.
Go to the Core Config Manager->Contacts (or Contact Groups), and click on the "Relationship Info" actions button next to the contact/contactgroup in question.
You should be able to see the hosts/services this contact/contactgroup is assigned to. Let me know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked