Page 1 of 1

Notification sent to two contacts, only one is sent an email

Posted: Fri Nov 29, 2013 5:40 am
by MLeppink
Hello all,

We are evaluating Nagios XI, but already encountered a very annoying issue.
Searched the forum and other online resources for a solution, but can't seem to get an issue solved with alerts not being sent for the contact 'nagiosadmin'.

The log claims an alert is sent to two contacts -- My personal contact, and nagiosadmin.
Here are the 4 last lines of /usr/local/nagios/var/nagios.log, showing a disk usage check in stage 4/5 and 5/5, and then creating the notification:
[1385720340] SERVICE ALERT: hostname.domain.local;Drive C: Disk Usage;WARNING;SOFT;4;C:\ - total: 148.95 Gb - used: 15.49 Gb (10%) - free 133.46 Gb (90%)
[1385720400] SERVICE ALERT: hostname.domain.local;Drive C: Disk Usage;WARNING;HARD;5;C:\ - total: 148.95 Gb - used: 15.49 Gb (10%) - free 133.46 Gb (90%)
[1385720400] SERVICE NOTIFICATION: nagiosadmin;hostname.domain.local;Drive C: Disk Usage;WARNING;xi_service_notification_handler;C:\ - total: 148.95 Gb - used: 15.49 Gb (10%) - free 133.46 Gb (90%)
[1385720400] SERVICE NOTIFICATION: myname;hostname.domain.local;Drive C: Disk Usage;WARNING;xi_service_notification_handler;C:\ - total: 148.95 Gb - used: 15.49 Gb (10%) - free 133.46 Gb (90%)


Also in the web-interface I see the same : A notification is created for both contacts.

- Both contacts have a valid email address, use the same contact template, timing of notifications, and are enabled to receive host and service notifications.
- I have also alternated the Nagios installation between "SMTP" and "Sendmail" sending of alerts -- This did not help.
- I debugged on the server that receives the email -- Only one email is submitted.
- Switching to "Sendmail" as mail method, I could debug on the Nagios server -- /var/log/maillog shows that no email for the contact nagiosadmin is submitted to be sent.

So as far as I can tell, Nagios never submits an email for this contact.
I would like to find out why the notification is created, but a subsequent email is not sent. Any help to debug this would be greatly appreciated.

Version: Nagios XI 2012R2.5, deployed through VMware OVF template nagiosxi-2012r2.5-64.ova [CentOS 6.4]
No proxies, SSL, or any adaptations of any kind have been done to the system.
No additional modules, add-ons installed.
Basically the installation is vanilla, and I encounter this issue upon testing my first host to monitor.

Thanks in advance,
M

Re: Notification sent to two contacts, only one is sent an e

Posted: Mon Dec 02, 2013 11:14 am
by scottwilkerson
If you log in as nagiosadmin, and click the username in upper-right, click "Notification Preferences"

Are all boxes checked? Are all times set to
00:00 - 24:00

If so click "Notification Methods"
Is email checked?

Re: Notification sent to two contacts, only one is sent an e

Posted: Tue Dec 03, 2013 7:28 am
by MLeppink
Hello Scott,

I made the mistake thinking that these settings were reflected in the "contact"-properties, where all settings seemed to indicate that the boxes were checked.
As my idea was to make 'nagiosadmin' a functional account (not to be logged in, receiving emails in a separate mailbox for long-term storage), I was managing the nagios server with my personal admin account, as soon as I had created it for myself.

So while extremely simple to solve (login as nagios-admin, to see that indeed the personal preferences showed many boxes unchecked) this leaves me with an administrative question:
- Can I, as an admin user, view (and influence) the preferences of other users?
- Where are these preferences stored on the nagios server?

Many thanks for pointing out what turned out to be a user-error.
M

Re: Notification sent to two contacts, only one is sent an e

Posted: Tue Dec 03, 2013 11:59 am
by abrist
MLeppink wrote:- Can I, as an admin user, view (and influence) the preferences of other users?
Yes. Login as an admin, go to the user management page, and masquerade as a user. While doing so, you can change their settings. If you have Enterprise, you can also set system wide notification settings as well.
MLeppink wrote:- Where are these preferences stored on the nagios server?
In the postgresql database.

Re: Notification sent to two contacts, only one is sent an e

Posted: Thu Dec 05, 2013 4:12 am
by MLeppink
Many thanks for the replies!
This answers all my questions.