Re: Questions from a beginner

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Questions from a beginner

Post by WillemDH »

Did you get my pm? The message seems to stay in out box instead of sent items..

In fact I already tried your proposal before, but it wasn't working, so I tried changing it to the xi notification handlers. But i did the test again, set everything exactly as you asked and redid the test. The notifications are visible for test.contact and willem.dh in the notifications view, but no email has been sent out to the willem.dh email address..
Nagios XI 5.8.1
https://outsideit.net
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Questions from a beginner

Post by slansing »

Hmm, odd, maybe my reply did not get to you either I am going to try re-sending it as it has email addresses in it that we should not share on the open forum.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Questions from a beginner

Post by WillemDH »

So the problem is that contacts seem to use an other smtp address as users. At the moment we can see in the maillog that email for contacts is sent to mail.domain.be Does anyone know how to change this for contacts? Email sent to users use the correct smtp server configures in Admin > Manage Email Settings
Nagios XI 5.8.1
https://outsideit.net
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Questions from a beginner

Post by slansing »

I replied to your PM William, can you also send me an example of a contact who is having emails routed to them from XI through the incorrect SMTP domain? Also an updated snapshot if you have made changes to them, thanks!
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Questions from a beginner

Post by WillemDH »

Email sent to a user is sent throught the correct smtp address. Email sent to contacts is sent to another smtp address... The smtp address in smanage email settings is correct... In the maillog i can see nagios trying to send email to a contact with the wrong smtp server.
Nagios XI 5.8.1
https://outsideit.net
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Questions from a beginner

Post by abrist »

How many contacts do you have that are not XI users? If the number is small, you could always make them a user with a random, large character number password. This would allow you to use the xi notification handlers instead of the core ones.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Questions from a beginner

Post by WillemDH »

That is what I'm doing now. I need to create a user for every email contact. It isn't a "clean" solution though. Would be nice if someone could tell me why the smtp server settings from "Manage email settings are not used by the core notification handler.
Last edited by WillemDH on Mon May 20, 2013 9:24 am, edited 1 time in total.
Nagios XI 5.8.1
https://outsideit.net
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Questions from a beginner

Post by abrist »

Could you post a copy of your notify-*-by-email commands?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Questions from a beginner

Post by WillemDH »

Do you mean this?

notify-host-by-email
/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$

notify-service-by-email
/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
Nagios XI 5.8.1
https://outsideit.net
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Questions from a beginner

Post by sreinhardt »

The reason the standard notify-by commands and the XI-notify commands are different, is due to a complete rewrite of how notifications are sent. The standard nagios commands are sent through core and use your local mta, whereas the new commands are sent through php-mailer, use postgres information.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked