Page 2 of 2
Re: Nagios Core - Problem with E-Mail Notifications
Posted: Tue Apr 26, 2016 10:02 am
by rkennedy
Looks like it's still set at that (root@localhost). Please PM your
/usr/local/nagios/var/objects.cache file for me to look at.
Last thing, Nagios Core don't need the "E-Mail Configuration" (Pop Server, Smtp Server, Authentication credentials) for sending the E-Mail?
No, it uses the basic mail sending on your machine. Was there a specific reason you switched from Nagios XI?
Re: Nagios Core - Problem with E-Mail Notifications
Posted: Wed Apr 27, 2016 1:47 am
by Bone8Head
rkennedy wrote:Looks like it's still set at that (root@localhost). Please PM your
/usr/local/nagios/var/objects.cache file for me to look at.
Last thing, Nagios Core don't need the "E-Mail Configuration" (Pop Server, Smtp Server, Authentication credentials) for sending the E-Mail?
No, it uses the basic mail sending on your machine. Was there a specific reason you switched from Nagios XI?
I PM'ed you.
Re: Nagios Core - Problem with E-Mail Notifications
Posted: Wed Apr 27, 2016 9:17 am
by rkennedy
You'll want to modify your contact definition to be accurate, and not have the email set to nagios@localhost -
Code: Select all
define contact {
contact_name nagiosadmin
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options r,w,u,c,f,s
host_notification_options r,d,u,f,s
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email nagios@localhost
minimum_importance 0
host_notifications_enabled 1
service_notifications_enabled 1
can_submit_commands 1
retain_status_information 1
retain_nonstatus_information 1
}
Re: Nagios Core - Problem with E-Mail Notifications
Posted: Thu Apr 28, 2016 7:22 am
by Bone8Head
The Problem was that in the Contacts files there was a duplicate "notify-host-email". Don't know why nagios didn't tell me that before.
By the way, there is a way to DISABLE only the "Recovery" E-Mails? I need only the Warning - Critical E-Mails.
Re: Nagios Core - Problem with E-Mail Notifications
Posted: Thu Apr 28, 2016 1:10 pm
by rkennedy
You'll want to remove the -r flag from your definition. See this -
notification_options: This directive is used to determine when notifications for the host should be sent out. Valid options are a combination of one or more of the following: d = send notifications on a DOWN state, u = send notifications on an UNREACHABLE state, r = send notifications on recoveries (OK state), f = send notifications when the host starts and stops flapping, and s = send notifications when scheduled downtime starts and ends. If you specify n (none) as an option, no host notifications will be sent out. If you do not specify any notification options, Nagios will assume that you want notifications to be sent out for all possible states. Example: If you specify d,r in this field, notifications will only be sent out when the host goes DOWN and when it recovers from a DOWN state.
https://assets.nagios.com/downloads/nag ... tions.html
Re: Nagios Core - Problem with E-Mail Notifications
Posted: Fri Apr 29, 2016 1:41 am
by Bone8Head
rkennedy wrote:You'll want to remove the -r flag from your definition. See this -
notification_options: This directive is used to determine when notifications for the host should be sent out. Valid options are a combination of one or more of the following: d = send notifications on a DOWN state, u = send notifications on an UNREACHABLE state, r = send notifications on recoveries (OK state), f = send notifications when the host starts and stops flapping, and s = send notifications when scheduled downtime starts and ends. If you specify n (none) as an option, no host notifications will be sent out. If you do not specify any notification options, Nagios will assume that you want notifications to be sent out for all possible states. Example: If you specify d,r in this field, notifications will only be sent out when the host goes DOWN and when it recovers from a DOWN state.
https://assets.nagios.com/downloads/nag ... tions.html
I resolved this, thank you. We can close the thread.
Re: Nagios Core - Problem with E-Mail Notifications
Posted: Fri Apr 29, 2016 9:54 am
by rkennedy
Awesome! Closing this out.