Page 1 of 4
Unable to send notifications to contact SMS email
Posted: Mon Dec 05, 2016 8:57 am
by jsharris
I am trying to get notifications for specific services sent to the cell phones of contacts in Nagios but they are not being received. If I change a user's email address to the SMS email gateway address and send a test message it is received without issue. If trying to send to a contact, however, it does not make it. Notification history shows a message is sent. We are using SMTP through a local Exchange server for mail processing.
I have tried both the generic and xi_contact contact templates, as well as the notify-service-by-email and xi-service-notification-handler service notification commands without success (as well as combinations of both). When I have a user with a regular email and a contact with an SMS email address, the user receives the notification as expected but nothing arrives at the phone.
We could set up users instead of contacts but want to limit the number of users configured in Nagios. Also, we need to limit the notifications going out to phones to only a limited number of service and hosts checks.
Please help me figure out what I am missing. Thanks!
Re: Unable to send notifications to contact SMS email
Posted: Mon Dec 05, 2016 1:53 pm
by avandemore
Can we start with this:
XI > Admin > System Profile > Download Profile
Please include the zip file in your response. You can PM myself or other support personnel if you have privacy concerns.
Re: Unable to send notifications to contact SMS email
Posted: Mon Dec 05, 2016 1:56 pm
by jsharris
I am unable to download the system profile getting this when I try:
Code: Select all
PROFILE BUILD FAILED
Array
(
)
CODE: 1
I mentioned this in another post where the profile was needed but we did not come up with a solution.
Re: Unable to send notifications to contact SMS email
Posted: Mon Dec 05, 2016 1:59 pm
by avandemore
Re: Unable to send notifications to contact SMS email
Posted: Tue Dec 06, 2016 6:34 am
by jsharris
Those were the same instructions provided previously. I tried it again but the results are the same. Even went so far as to restart the server following the process. Still getting the PROFILE BUILD FAILED error.
Re: Unable to send notifications to contact SMS email
Posted: Tue Dec 06, 2016 11:02 am
by avandemore
Please attach or PM your /etc/sudoers.
Re: Unable to send notifications to contact SMS email
Posted: Wed Dec 07, 2016 11:29 am
by jsharris
Tried to work around this by setting up a distribution group in Active Directory but that doesn't work, either. When sending to the AD group, none of the members receive it. I can successfully send a message from a mail client to the distribution group and receive it in both my mail client and my phone. If I set the service notification to go to just my user, it works. When sent to a contact in Nagios XI with an email address of my external account it is not received. When my user account in Nagios is configured to use my phone or external email address everything works fine. If I change the contact (non-user) address to the same address as my user's, it is not received.
We only seem to be having a problem sending to non-user contacts, regardless of the destination address.
Re: Unable to send notifications to contact SMS email
Posted: Wed Dec 07, 2016 12:09 pm
by avandemore
Can you run /usr/local/nagiosxi/scripts/reset_config_perms.sh and attempt the profile again?
Re: Unable to send notifications to contact SMS email
Posted: Wed Dec 07, 2016 12:13 pm
by jsharris
Same error. Any service restarts or the like necessary for the change to be recognized?
Re: Unable to send notifications to contact SMS email
Posted: Wed Dec 07, 2016 12:34 pm
by dwhitfield
Can you post or PM the output of the following:
Code: Select all
tail -100 /var/log/maillog
tail -100 /var/log/httpd/error_log
Also, at this point, the output of "Show Profile" rather than the larger "Download Profile" should give us some clues as to what is going on.