Down Time Notification from sender

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
elealyngarcia
Posts: 18
Joined: Sun Apr 28, 2019 6:09 pm

Down Time Notification from sender

Post by elealyngarcia »

Hi

We are having an issue with the Downtime Sender as @hostname.localdomain, instead of the Mail Settings Send Mail From:
Screenshot 2020-11-24 233749.png
Screenshot 2020-11-24 233559.png
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Down Time Notification from sender

Post by benjaminsmith »

Hi,

Try updating the field with just the email address (see screenshot) and then select the Send a Test Email button to see if the address field was updated correctly (perhaps it's not getting saved to the database).
email-from-address.png
If that's not working, run the following tail command and then repeat the same procedure and post the output. Thanks, Benjamin

Code: Select all

tail -f /var/log/httpd/*error_log
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
elealyngarcia
Posts: 18
Joined: Sun Apr 28, 2019 6:09 pm

Re: Down Time Notification from sender

Post by elealyngarcia »

We did configure that Email Setting, but we still have the issue for the Scheduled Downtime notification alert using the @localhost
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Down Time Notification from sender

Post by ssax »

This is likely because those contacts are using the notify-host-by-email/notify-service-by-email commands.

Please PM me a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button and I'll verify that's the case.

You can either do this:

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

Or you can edit the notify-host-by-email/notify-service-by-email commands in Configure > Core Config Manager > Commands and add an option to the mail command to set the From address:

The defaults:

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:

Code: Select all

/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$

To: (for example, adding -S "from=Nagios XI <[email protected]>")

notify-host-by-email:

Code: Select all

/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 "from=Nagios XI <[email protected]>" -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
notify-service-by-email:

Code: Select all

/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 "from=Nagios XI <[email protected]>" -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
Then apply configuration and test.

See here as well:

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