Page 1 of 3

Issue sending alerts to All contacts within a Contact Groups

Posted: Wed Mar 05, 2014 9:16 am
by heritages
I have created 4 users
User 1 - Email Address 1
User 1 - Email Address 2 (sends SMS Alert)
User 2 - Email Address 1
User 2 - Email Address 2 (sends SMS Alert)

Created 3 contact groups
Contact Group - IT Infrastructure 24-7 Email
User 1 - Email Address 1
User 2 - Email Address 1
Contact Group - IT Infrastructure 24-7 SMS
User 1 - Email Address 2 (sends SMS Alert)
User 2 - Email Address 2 (sends SMS Alert)
Contact Group - IT Infrastructure 24-7 Email SMS
Contact Group - IT Infrastructure 24-7 SMS
Contact Group - IT Infrastructure 24-7 Email

When I assign Contact Group - IT Infrastructure 24-7 Email SMS that has nested contact groups I'm finding that I only receive the alerts for the users in Contact Group - IT Infrastructure 24-7 SMS and not Contact Group - IT Infrastructure 24-7 Email.

The same applies when I add both contact groups Contact Group - IT Infrastructure 24-7 Email and Contact Group - IT Infrastructure 24-7 SMS directly to the Alerts tab on the Host, I only receive the SMS alerts and not the Email alerts.

I've verified in the Notifications screen that only the SMS alerts are being sent.

Note, if I only add the group Contact Group - IT Infrastructure 24-7 Email then we are receiving the email alerts with out any issue.

Any ideas why this is happening and a suggested solution

Re: Issue sending alerts to All contacts within a Contact Gr

Posted: Wed Mar 05, 2014 2:49 pm
by sreinhardt
I just want to verify, these are 4 separate users and contacts, and not just 2 users with both sms and email settings set? What notification commands are you using for them?

Re: Issue sending alerts to All contacts within a Contact Gr

Posted: Wed Mar 05, 2014 3:46 pm
by heritages
Yes I created 4 separate users because I wanted to use an email address to send an SMS as well I wanted to separate when to send an email and when to send an SMS.

Where can I find the notification command?

Re: Issue sending alerts to All contacts within a Contact Gr

Posted: Wed Mar 05, 2014 4:24 pm
by sreinhardt
The notification commands would be in the contact configuration options within CCM.

Re: Issue sending alerts to All contacts within a Contact Gr

Posted: Thu Mar 06, 2014 11:13 am
by heritages
I'm going to guess that you're asking about
CCM > Alerting > Contacts > <user> > Alert Settings > Manage Host Notifications Commands
if so then that is not set. But then non of my users were set yet the SMS alerts are going out.

Let me know if this is what you were looking for.

Re: Issue sending alerts to All contacts within a Contact Gr

Posted: Thu Mar 06, 2014 4:51 pm
by lmiltchev
Yes I created 4 separate users because I wanted to use an email address to send an SMS as well I wanted to separate when to send an email and when to send an SMS.
Log in as each user, and try to send a test email/sms. Check to see if you can receive it.
Note: If you created users, which are also monitoring contacts, they should be using the "xi_host_notification_handler" and "xi_service_notification_handler" commands.

Re: Issue sending alerts to All contacts within a Contact Gr

Posted: Thu Mar 06, 2014 4:53 pm
by slansing
SMS will go out to your users regardless of the contact commands I believe, as they are handled differently. You should have the xi_host and xi_service notification commands in those fields in the CCM, if you are not linking users to these contacts then you can just use the notify_host and notify_service commands:

http://assets.nagios.com/downloads/nagi ... ations.pdf

Re: Issue sending alerts to All contacts within a Contact Gr

Posted: Mon Mar 10, 2014 12:08 pm
by heritages
I went into each contact under CCM > (Contact Name) > Alert Settings > Manage Host Notifications Commands and added xi_host_notification_handler and xi_service_notification_handler to the service command.

Still only the alert to the users heritagesms and cadranelsms were sent.

Re: Issue sending alerts to All contacts within a Contact Gr

Posted: Mon Mar 10, 2014 2:44 pm
by technick
I know this doesn't directly answer your issue but this could help you find the answer.

When Nagios reads in its configuration files, it creates a cache files with every object defined and the properties they inherit.

Check out /usr/local/nagios/var/objects.cache

Re: Issue sending alerts to All contacts within a Contact Gr

Posted: Mon Mar 10, 2014 4:44 pm
by sreinhardt
This is a pretty good idea, it never hurts to check how nagios actually "compiled" the configs into the objects.cache file. Specifically I would look for the contact group object within it.