Nagios FROM email address
-
MarkCampbell
- Posts: 20
- Joined: Tue Oct 16, 2018 4:29 pm
Nagios FROM email address
This may be a stupid question, but I've been going throughout the UI looking for this and have only seen one field for the Nagios FROM email field, which I've found in nagiosxi/admin/mailsettings.php. I've changed it here to Nagios XI <[email protected]>, and when I tell it to send me a test email, I get it exactly as I typed it in... but when I receive actual alert emails, it comes as [email protected] (this server is in AWS, which defaults the hostname to the IP in dashes). Where else could this alternate email address be set?
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Nagios FROM email address
HI Mark,
Thanks for trying out Nagios XI and welcome to the Nagios Customer Support Forum!
For clarification, are you using SMTP or Sendmail in your email settings ( a screenshot would be helpful)?
Regards,
Benjamin
Thanks for trying out Nagios XI and welcome to the Nagios Customer Support Forum!
For clarification, are you using SMTP or Sendmail in your email settings ( a screenshot would be helpful)?
Regards,
Benjamin
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
MarkCampbell
- Posts: 20
- Joined: Tue Oct 16, 2018 4:29 pm
Re: Nagios FROM email address
I am using SMTP to connect to Amazon SES.
You do not have the required permissions to view the files attached to this post.
Re: Nagios FROM email address
This is likely because those contacts are using the notify-host-by-email/notify-service-by-email commands. 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:
notify-service-by-email:
To: (for example, adding -S "from=Nagios XI <[email protected]>")
notify-host-by-email:
notify-service-by-email:
Then apply configuration and test.
See here as well:
https://assets.nagios.com/downloads/nag ... ntacts.pdf
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:
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 "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$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$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$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$See here as well:
https://assets.nagios.com/downloads/nag ... ntacts.pdf
-
MarkCampbell
- Posts: 20
- Joined: Tue Oct 16, 2018 4:29 pm
Re: Nagios FROM email address
Thanks that worked, I imported my configuration from a Nagios Core instance, but didn't realize it was overriding the use of the php mailer.
Re: Nagios FROM email address
Glad that worked for you! Let us know when we're okay to lock this up and mark it as resolved.
Thank you!
Thank you!
-
MarkCampbell
- Posts: 20
- Joined: Tue Oct 16, 2018 4:29 pm
Re: Nagios FROM email address
I think I'm good to mark this as resolved.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios FROM email address
Great!MarkCampbell wrote:I think I'm good to mark this as resolved.
Locking thread