not getting email notifications

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
durgaprasadbalivada
Posts: 2
Joined: Wed Aug 12, 2020 5:42 am

not getting email notifications

Post by durgaprasadbalivada »

Hi

we are using nagios core as a monitoring tool for our windows server and we have followed the docs and configured the windows host machine and the server is up and running but we tried to configure email notification m not getting any mail when the server is down below is how my contacts.cfg looks like

define contact {

contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}

define contact {

contact_name prasad
use generic-contact
alias durga prasad
email [email protected]
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email


define contactgroup {

contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}

define contactgroup {

contactgroup_name windows-admin
alias windows admins dept
members prasad, nagiosadmin




here is how my windows.cfg looks like for notifications

define host {

use windows-server ; Inherit default values from a template
host_name abcccdd ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address xxx.xxx.xxx.xxx ; IP address of the host
contact_groups windows-admin
}

but m not sure why m not getting any notifications

Note: m running nagios as a docker.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: not getting email notifications

Post by benjaminsmith »

Hi,

Welcome to the Nagios Community Forum!

If it just works for this one single host, and notifications are working just fine on the other checks, then it's most likely a configuration setting. I would recommend searching in the objects.cache file for the settings of this host to verify the notifications, check period, and notification period all are correct.

The other thing to remember is that it must have entered a non-ok state to trigger the notification, so look in the nagios.log to make sure the host actually went down and fired the notification handler.

Make sure you're able to send a custom notification from the host and receive it.

This document is for Nagios XI, but it contains some good tips for troubleshooting notification problems.

Nagios XI - Notification Problems

Let us know what you discover.

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!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: not getting email notifications

Post by benjaminsmith »

Hi,

Welcome to the Nagios Community Forum!

If it just works for this one single host, and notifications are working just fine on the other checks, then it's most likely a configuration setting. I would recommend searching in the objects.cache file for the settings of this host to verify the notifications, check period, and notification period all are correct.

The other thing to remember is that it must have entered a non-ok state to trigger the notification, so look in the nagios.log to make sure the host actually went down and fired the notification handler.

Make sure you're able to send a custom notification from the host and receive it.

This document is for Nagios XI, but it contains some good tips for troubleshooting notification problems.

Nagios XI - Notification Problems

Let us know what you discover.

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!
Locked