Page 1 of 1
How to send Service notifications even if Host is down
Posted: Wed May 01, 2013 12:11 pm
by ecarrasq
Linux Distribution and version? CentOS, 2.6.18-308.8.2.el5PAE
32 or 64bit? 32bit
VMware Image or Manual Install of XI? VMware Image
Are there specials configurations on your system, ie; is Gnome installed? No
Are you using a proxy? No
Are you using SSL? Yes
Nagios Version? Nagios XI 2012R1.6
Issue:
I would like to alert the "Windows Server Admins" when one of their servers goes down, and when the C drive is full.
If I add them to the Host, as Contacts, they would get all the other service notifications for the host which they do not want. And I need to have all the other service checks, as other administrators need to be notified.
What is the recommended setup in this scenario?
What I've done, but I don't think it's the best option:
Services:
Ping
C drive
Contact Group:
Windows_Server_Admins
Host Group:
Windows_Critical
So when a new server is built, I simply add it to the "Windows_Critical" Host Group, and it will inherit the above service checks; However, I'm not 100% certain they are getting these notifications if the host is unreacheable or down.
What is the recommended setup in this scenario?
Thank you,
Eddie
Re: How to send Service notifications even if Host is down
Posted: Wed May 01, 2013 1:04 pm
by slansing
What you could also do, is just assign the contactgroup to the specific services, or a service group, that way they will not inherently receive notifications for all the services under a host. You can verify notifications are being sent to them by checking the notifications page from Home > Notifications, once a threshold that they should be notified on is met, the notifications being sent will drop into this list.
Re: How to send Service notifications even if Host is down
Posted: Wed May 01, 2013 1:08 pm
by ecarrasq
So if a service has a contact assigned to it, who ever is in the host contact will not receive that service notification? (counting they are not in the contact for the service)
Edit 2: On my above scenario that I created the service check and assigned it to the host group....
I set the service to volatile, so that if the host is down they will still get an alert; However, notifications are not going out. If I have 100 hosts in the host group of which the volatile service is assigned and one of those hosts triggers a notification, does that mean that since the service is volatile, no notification will be sent for the other 99 hosts, as when volatile is checked it only triggers once?
Edit 3: thirdly, is there a way to "Not" inherit service notifications once added to the Host Contact group?
Re: How to send Service notifications even if Host is down
Posted: Wed May 01, 2013 1:52 pm
by slansing
1: No, Hosts and Services are not the same objects so they follow different rules, you can assign whoever you want to either and they will be notified for that object, so, if you have a contact assigned to a service but not it's host, it will only receive notifications related to that service.
2: If the host is down this means "in most cases" the service's will be unable to run active checks so they will go into a critical as well, in which case all of the contacts will be notified anyways regardless. You "MUST" have a contact assigned to these services or there will be no where for the notifications to go, so they will not be generated.
Edit 3:
thirdly, is there a way to "Not" inherit service notifications once added to the Host Contact group?
Can you provide more detail on this? Notifications are not inherited, the contacts control where the notifications are sent, so once a contact is associated with said host/service hostgroup/servicegroup he/she will receive notifications for the object. The way to prevent this would be to not add the contact to that object.
Volatile services differ from "normal" services in three important ways. Each time they are checked when they are in a hard non-OK state, and the check returns a non-OK state (i.e. no state change has occurred)...
The non-OK service state is logged
Contacts are notified about the problem (if that's what should be done). Note: Notification intervals are ignored for volatile services.
The event handler for the service is run (if one has been defined)
These events normally only occur for services when they are in a non-OK state and a hard state change has just occurred. In other words, they only happen the first time that a service goes into a non-OK state. If future checks of the service result in the same non-OK state, no hard state change occurs and none of the events mentioned take place again.
http://nagios.sourceforge.net/docs/3_0/ ... vices.html
I would read over this page a bit to make sure volatile is what you are actually looking for. Let me know if I am looking at your predicament the wrong way, I may have misunderstood your relationship questions.
Re: How to send Service notifications even if Host is down
Posted: Wed May 01, 2013 2:05 pm
by ecarrasq
I'll clarify:
I need to notify a certain group of admins when hosts are down without notifying them of the other services on those hosts.
Example:
Host
service01
service02
service02
admin01 and admin02 would only like to know when "Host" is down. They don't care about getting service01, service02, service03 notifications; However admin03 and admin04 would like to know when service01, service02, and service03 goes into warning/critical.
What is the best way of accomplishing this?
Edit 3: I think I got a workaround!
I would create admin01 and admin02 with "Host only" notifications defined in their contact servcie options/commands. Meaning, I can just disable the service notifications, for them. I will however have to create a separate set of contacts if they would also like to be notified when the C drive is full.
Edit 2: I can then use the "Bulk Modifications Tool" to add them in bulk, versus going host by host manually.
Re: How to send Service notifications even if Host is down
Posted: Wed May 01, 2013 3:12 pm
by slansing
Yes you could define the contacts in this fashion, and the Bulk Mods tool would help you deploy this idea much faster. Can you please not double or triple post if you were the last to respond to help keep clutter down, that way we can view your messages all together instead of hunting through the pages if we need to refer to this thread in the future, thanks!
