Nagios Xi contact group notification

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dimitrico
Posts: 19
Joined: Mon Oct 08, 2018 2:36 am

Nagios Xi contact group notification

Post 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.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Xi contact group notification

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
dimitrico
Posts: 19
Joined: Mon Oct 08, 2018 2:36 am

Re: Nagios Xi contact group notification

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Xi contact group notification

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
dimitrico
Posts: 19
Joined: Mon Oct 08, 2018 2:36 am

Re: Nagios Xi contact group notification

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Xi contact group notification

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
dimitrico
Posts: 19
Joined: Mon Oct 08, 2018 2:36 am

Re: Nagios Xi contact group notification

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Xi contact group notification

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
dimitrico
Posts: 19
Joined: Mon Oct 08, 2018 2:36 am

Re: Nagios Xi contact group notification

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Xi contact group notification

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked