Page 1 of 1

Nagios Xi contact group notification

Posted: Tue Feb 19, 2019 3:24 am
by dimitrico
Hello,

In advance thank you for your support.

I created a Contact Group linked with Nagios services etc ...

And when the check result change (OK --> Warning) after X minutes an email is send to the contact group including all contacts.

All users received the alert exept the contact created by the way:

CCM --> Contacts --> Add new
Contact Name: *******
Description: ******
Email Address: ******
...

All other users received the notifications because they have an Nagios Account (Admin --> Manage Users).

I fail to see the difference between these two methods ?

Have a nice day.

Re: Nagios Xi contact group notification

Posted: Tue Feb 19, 2019 8:02 am
by scottwilkerson
In the Manage Host Notification Commands and Manage Service Notification Commands

Only XI users can use the commands xi_host_notification_handler and xi_service_notification_handler

If you setup a contact that isn't a user, you need to use a different notification command and it will not use the XI mail settings.

https://assets.nagios.com/downloads/nag ... ntacts.pdf

Re: Nagios Xi contact group notification

Posted: Tue Feb 19, 2019 9:08 am
by dimitrico
Ok thank you for your reply,

So, when I try to use another commands like:
- "notify-hosts-by-email"
and
- "notifiy-service-by-email"

It's the same result, the contact does not receive the notification.

Re: Nagios Xi contact group notification

Posted: Tue Feb 19, 2019 9:39 am
by scottwilkerson
These commands are routed through the the mail client on the server can you see any errors in the maillog?

Code: Select all

tail -50 /var/log/maillog

Re: Nagios Xi contact group notification

Posted: Thu Feb 21, 2019 5:57 am
by dimitrico
Hello,

The log is ok and all emails are sent as below:

Feb 18 13:08:21 AZEW-PRD-MON01 sendmail[69359]: x1IC7L8l069359: to=*********@*********.com, ctladdr=nagios.noreply@*********.com (1002/1002), delay=00:01:00, xdelay=00:00:00, mailer=relay, pri=31804, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (x1IC8LbH070272 Message accepted for delivery)
Feb 18 13:35:40 AZEW-PRD-MON01 sendmail[82922]: x1ICZd9e082922: to=US904-*********Admins@*********.com, ctladdr=nagios (1002/1002), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30592, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (x1ICZdBb083454 Message accepted for delivery)
Feb 19 03:44:11 AZEW-PRD-MON01 sendmail[63214]: x1J2iBZs063214: to=*********, ctladdr=********* (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30938, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (x1J2iBVV065487 Message accepted for delivery)
Feb 20 03:18:27 AZEW-PRD-MON01 sendmail[90538]: x1K2IRVq090538: to=*********, ctladdr=********* (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30983, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (x1K2IR5o091004 Message accepted for delivery)
Feb 21 03:11:10 AZEW-PRD-MON01 sendmail[6565]: x1L2BAo8006565: to=*********, ctladdr=********* (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30983, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (x1L2BAmO007061 Message accepted for delivery)

Could you tell me if the following Notification commands can be use for the contact user simple (email only without an access to NagiosXI):

Host: notify-host-by-email
Services: notify-service-by-email

Thank you.

Re: Nagios Xi contact group notification

Posted: Thu Feb 21, 2019 8:05 am
by scottwilkerson
Somehow it looks like your local sendmail configuration is just setup to relay through itself which isn't going to work

Code: Select all

relay=[127.0.0.1] [127.0.0.1]
I actually have no idea what was changed to make it do this

Re: Nagios Xi contact group notification

Posted: Thu Feb 21, 2019 8:47 am
by dimitrico
You're making a big mistake, it's not the problem.

All notification are sentby email for each NagiosXI users into the contact group.

The problem appear when I create a simple contact with an email: CCM --> Contacts --> Add New

Re: Nagios Xi contact group notification

Posted: Thu Feb 21, 2019 9:06 am
by scottwilkerson
the following notification commands will not use SMTP settings specified in the Nagios XI GUI
Host: notify-host-by-email
Services: notify-service-by-email

We do have a document outlining how to set this up
https://assets.nagios.com/downloads/nag ... Mailer.pdf

Re: Nagios Xi contact group notification

Posted: Fri Feb 22, 2019 9:11 am
by dimitrico
Ah ok thank you for your explanation, I undershoot now ... I'm going to solve my postfix configuration on Linux and I come back you.

Re: Nagios Xi contact group notification

Posted: Fri Feb 22, 2019 11:02 am
by scottwilkerson
dimitrico wrote:Ah ok thank you for your explanation, I undershoot now ... I'm going to solve my postfix configuration on Linux and I come back you.
sounds good