XI Contact Group alerting question - How?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
chris_rr
Posts: 16
Joined: Fri Dec 09, 2016 3:55 pm

XI Contact Group alerting question - How?

Post by chris_rr »

Hi,

Doing a PoC for nagiosXI, and while I can easily see how to get alerts sent to users, i'd like to be able to turn off alerts for individual users and just use contact groups.. however..
I see no way to configure alerts to send to a contact group other than going individually through each and every host and service and selecting the contact group. As that's too ridiculous to be the only way.. can somebody tell me what I'm missing here?

thanks
Christopher
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: XI Contact Group alerting question - How?

Post by avandemore »

If the hosts or services use a template, they can inherit from the template:

https://assets.nagios.com/downloads/nag ... tance.html

Or create a hostgroup or servicegroup and have it use a template.
Previous Nagios employee
chris_rr
Posts: 16
Joined: Fri Dec 09, 2016 3:55 pm

Re: XI Contact Group alerting question - How?

Post by chris_rr »

To clarify, when I'm editing contacts in the XI gui, I have the options in the Alert Setting tab to choose what that user gets an alert for - hosts, services, what level, etc.

I don't see anything similar for Contact Groups unless i'm editing a host or service's notification parameters.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: XI Contact Group alerting question - How?

Post by eloyd »

When a host or service triggers an alert, it sends its alerts to all contacts and contactgroups defined on that host or service. Each contactgroup can potentially inherit other contractgroups, but eventually all contactgroups contain contacts. So eventually, all alerts are sent to one or more contacts.

At that point, the individual contact's preferences are applied, so if a service sends a warning to someone who doesn't want to get warning messages for services, then they won't get it.

So in the end, only the notification methods/preferences for contacts matters, as all contactgroups are expanded until they are simply a list of contacts.

Does that help?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: XI Contact Group alerting question - How?

Post by dwhitfield »

In addition to what @eloyd mentioned, there is information on contact groups at https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Please let us know if you have additional questions.
chris_rr
Posts: 16
Joined: Fri Dec 09, 2016 3:55 pm

Re: XI Contact Group alerting question - How?

Post by chris_rr »

Let's take an example I'll be trying to build:

10 users, 3 contact groups (A, B, C)

3 users are in contact group A.

We have hostgroups A, B, C.

I want all the hosts+services to alert users in contact group A. Those users should see no other alerts.

This doesn't actually appear to be easy to do in XI via the GUI at all. The template suggestion would mean I'd have to create 83 (at current XI count I see) templates x # of hostgroups.

Basically a page that can edit a contactgroup like you can edit a contact would go a long way.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: XI Contact Group alerting question - How?

Post by eloyd »

This is my fast solution, so it may not be exactly what you want:

You have three contact groups A, B, C (I'll call them cg-A, cg-B, and cg-C).

Create three host templates ht-A, ht-B, ht-C
Assign cg-A to ht-A
Assign cg-B to ht-B
Assign cg-C to ht-C

Create three service templates st-A, st-B, st-C
Assign cg-A to st-A
Assign cg-B to st-B
Assign cg-C to st-C

Assign st-A to all your services via the generic-service template and/or xi-generic-service template (templates can have templates).
Assing ht-A to all your hosts vai the generic-host and/or xi-generic-host templates
Assign st-B to the services that you want to notify cg-B
Assign ht-B to the hosts that you want to notify ht-B
Assign st-C to the services that you want to notify cg-C
Assign ht-C to the services that you want to notify cg-C

Done.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: XI Contact Group alerting question - How?

Post by bwallace »

Well put, Mr Loyd! OP, certainly let us know if there are additional questions.
Be sure to check out the Knowledgebase for helpful articles and solutions!
chris_rr
Posts: 16
Joined: Fri Dec 09, 2016 3:55 pm

Re: XI Contact Group alerting question - How?

Post by chris_rr »

That doesn't quite work for "all services associated with this host". Looks good for "All services of this type" tho.

One this this doesn't seem to work AT ALL for is passive services - so you can't edit passive services to manage alert settings or contact groups. Is that correct?
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: XI Contact Group alerting question - How?

Post by eloyd »

Ohhhh. "all services of this host" is not a valid selector. Unless you make a service template for every service that's supposed to be on host X, then assign those services to st-X. There's no way to do what you want directly, since hosts and services aren't really connected*.

And you're wrong about passive services. Just because Nagios didn't schedule or execute the service check doesn't mean it can't alert.


*Personally, I think it's time for Nagios Core 5 (I know, easy to ask for, hard to contribute) that makes everything an object and there's no difference between service and host or contact or dependency and you can just link things together however you want. This type of infrastructure would allow you to do what you want, but it's not there yet.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Locked