Notifications for specific server of hostgroup

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
belvdr
Posts: 81
Joined: Tue Oct 08, 2013 9:17 pm

Notifications for specific server of hostgroup

Post by belvdr »

It appears I'm currently using the "old" way of notifications:

I configure a host group, say sql-servers, that houses specific boxes.
I configure a service against the sql-servers host group.
I setup a contact for the regular email address and SMS email address for each division, which gives me 2 contact records for each division (such as DBA_email and DBA_page).
I then assign those two contacts to the service check for the group.

All is well with this.

Now, I have a different person (not a DBA) that needs to be paged only when one specific SQL box has an issue, not all.

Since I'm doing the check on a hostgroup, how can I assign this contact so they only receive pages for the service check on a particular box? Do I have to create an entirely new service check for this one contact? That could make for a long list of service checks to manage, depending on who gets wind of this possibility.

EDIT:

Here's an ASCII diagram of my current setup:

Code: Select all

+  DBA_page (contact)
  - [email protected]

+  DBA_email
  - [email protected]

+  sql-servers (hostgroup)
  - SQL1 (host)
     -  DBA_page (host contact)
     -  DBA_email (host contact)
  - SQL2 (host)
     -  DBA_page (host contact)
     -  DBA_email (host contact)

+ Port_1433 (service check)
  -  Checks TCP 1433 on sql-servers (hostgroup)
     -  DBA_page (service contact)
     -  DBA_email (service contact)
Here's what I need now (new user highlighted by **):

Code: Select all

+  DBA_page (contact)
  - [email protected]

+  DBA_email
  - [email protected]

+  sql-servers (hostgroup)
  - SQL1 (host)
     -  DBA_page (host contact)
     -  DBA_email (host contact)
  - SQL2 (host)
     -  DBA_page (host contact)
     -  DBA_email (host contact)

+ Port_1433 (service check)
  -  Checks TCP 1433 on sql-servers (hostgroup)
     -  DBA_page (service contact)
     -  DBA_email (service contact)
**   -  User1_email (service contact only for SQL1)
**   -  User1_page (service contact only for SQL1)
**   -  User2_email (service contact only for SQL2)
**   -  User2_page (service contact only for SQL2)
Last edited by belvdr on Tue Jul 01, 2014 1:25 pm, edited 1 time in total.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Notifications for specific server of hostgroup

Post by BanditBBS »

If I am understanding you correctly, I'm afraid it is bad news: You can't do it.

You would need the service configured for just that one host and setup the contact on that. You could do that and then exclude the host from the service config for the entire hostgroup.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
belvdr
Posts: 81
Joined: Tue Oct 08, 2013 9:17 pm

Re: Notifications for specific server of hostgroup

Post by belvdr »

Rat spit....

Thanks for the reply and have a good weekend.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Notifications for specific server of hostgroup

Post by tmcdonald »

Gonna have to agree with Bandit on this one. Unfortunately the only way other than his suggestion that I can think of is to modify the notification command to check which host is being alerted on and then include your contact... But that's messy and not maintainable for more than a handful of hosts.
Former Nagios employee
Locked