Not getting Email alerts
-
- Posts: 74
- Joined: Thu Jan 25, 2018 1:13 am
Not getting Email alerts
I have setup a "Disk Space Data" alert for a specific hosts which is supposed to send email alerts for W,C,U and SMS alerts just only for C. SMS alert is working like charm, but we are not getting email alerts. However, I compared the configuration with other hosts which are sending email alerts, and didn't find any errors or differences.
I have attached the doc which can give you host and service details.
Sample Server: adx800
Issuer Server: adxp011a
W = warning
C = Critical
U = Unknown
I have attached the doc which can give you host and service details.
Sample Server: adx800
Issuer Server: adxp011a
W = warning
C = Critical
U = Unknown
- Attachments
-
- Service_Info.txt
- (2.43 KiB) Downloaded 224 times
-
- Host_Info.docx
- (12.09 KiB) Downloaded 182 times
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Not getting Email alerts
Hello @shamrozkadiwal
Let's verify that you are able to send and receive a custom service notification for the Disk Space Data service. From the Nagios Core homepage go to Services > Find the adxp011a server > click on Disk Space Data > Send Custom Service Notification. Let me know if this is working or not.
Can you send over the contact/contact group definitions, and the definition for the generic-data host template. Also are there any error messages in the mail log for errors /var/log/maillog. Thank you.
Let's verify that you are able to send and receive a custom service notification for the Disk Space Data service. From the Nagios Core homepage go to Services > Find the adxp011a server > click on Disk Space Data > Send Custom Service Notification. Let me know if this is working or not.
Can you send over the contact/contact group definitions, and the definition for the generic-data host template. Also are there any error messages in the mail log for errors /var/log/maillog. Thank you.
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!
-
- Posts: 74
- Joined: Thu Jan 25, 2018 1:13 am
Re: Not getting Email alerts
Hey Benjamin,
You asked me couple of things. First, I have attached the contact.cfg file and paste generic-data host template.
Second, I tried Custom Service Notification and it worked. I mean I received the email [Picture attached]. However, If you noticed that I sent another picture of my inbox which indicates that I had never received adxp011a alert email before , so It means email part is working when we commit service notification.
In addition, I didn't find any errors in the /var/log/maillog, but I found few records after I ran the Custom Service Notification with no errors.
Thanks,
You asked me couple of things. First, I have attached the contact.cfg file and paste generic-data host template.
Code: Select all
# TEMPLATE
define host{
name generic-data
hostgroups data-servers
check_command check-host-alive
check_period 24x7
max_check_attempts 10
notification_options d,u,r
notification_interval 90
notification_period no-sun
parents aus-fwv-wh-5540a
contact_groups ets-pager
register 0
}
In addition, I didn't find any errors in the /var/log/maillog, but I found few records after I ran the Custom Service Notification with no errors.
Thanks,
- Attachments
-
- Contacts.txt
- (14.02 KiB) Downloaded 213 times
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Not getting Email alerts
Hello @shamrozkadiwal,
To summarize:
1. You receive the correct SMS notifications for disk space data on adxp011a
2. You are not receiving the correct email notification for disk space data on adxp011a.
3. You are able to send a Customer Service Notification, so email is working.
There's an error somewhere in the configuration definitions. For the hostgroup, data-servers, can you verify the notification period is correct? You have no-sun set, but the generic-contact template is set for 24x7 notification period. Also, take a look at the generic-data template for any issues.
To summarize:
1. You receive the correct SMS notifications for disk space data on adxp011a
2. You are not receiving the correct email notification for disk space data on adxp011a.
3. You are able to send a Customer Service Notification, so email is working.
There's an error somewhere in the configuration definitions. For the hostgroup, data-servers, can you verify the notification period is correct? You have no-sun set, but the generic-contact template is set for 24x7 notification period. Also, take a look at the generic-data template for any issues.
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!
-
- Posts: 74
- Joined: Thu Jan 25, 2018 1:13 am
Re: Not getting Email alerts
1. You receive the correct SMS notifications for disk space data on adxp011a YES
2. You are not receiving the correct email notification for disk space data on adxp011a. YES
3. You are able to send a Customer Service Notification, so email is working. YES
I checked these two below files for notification setting, but found only in one file.
/etc/nagios/host/hostgroups.cfg
/etc/nagios/host/data.cfg
I don't see any errors or issue, but not sure why we are not getting emails for adxp011a. Whereas sample server (adx800) has the same setting, host and service groups and it is getting all kind of alerts.
2. You are not receiving the correct email notification for disk space data on adxp011a. YES
3. You are able to send a Customer Service Notification, so email is working. YES
I checked these two below files for notification setting, but found only in one file.
/etc/nagios/host/hostgroups.cfg
Code: Select all
define hostgroup{
hostgroup_name data-servers
alias Data Servers
}
Code: Select all
# TEMPLATE
define host{
name generic-data
hostgroups data-servers
check_command check-host-alive
check_period 24x7
max_check_attempts 10
notification_options d,u,r
notification_interval 90
notification_period no-sun
parents aus-fwv-wh-5540a
contact_groups ets-pager
register 0
}
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Not getting Email alerts
Please verify your configuration by running the following command and post any errors or warning messages:
You have 3 different service definitions for Disk Space Data, and this can be problematic as no two services associated with the same host can have the same description. Services are uniquely identified with their host_name and service_description directives.
https://assets.nagios.com/downloads/nag ... ml#service
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
https://assets.nagios.com/downloads/nag ... ml#service
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!
-
- Posts: 74
- Joined: Thu Jan 25, 2018 1:13 am
Re: Not getting Email alerts
Please find the attached file
- Attachments
-
- nagios_check.txt
- (23.43 KiB) Downloaded 214 times
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Not getting Email alerts
Hello shamrozkadiwal,
Let's change the debug level settings to capture notification data, and then put adxp011a into a down state and then back up (recovery state). We will then take a look at the log file for this host and review the state changes and whether or not notifications were sent.
1. Open up the nagios configuration file /usr/local/nagios/etc/nagios.cfg, and set debug_level=32, and then re-start Nagios.
2. Put the adxpo11a into a down state and then a recovery.
2. Post or PM the nagios log data or the contents of the log file at /usr/local/nagios/var
nagios.log. You'll want to search the log data for host notification entries for adxp011a. The perl statement at the end will convert the unix timestamp into human readable text. Are notifications beings sent? If so, to the correct contacts?
Let me know what you find out.
Main Configuration File Options
https://assets.nagios.com/downloads/nag ... gmain.html
Let's change the debug level settings to capture notification data, and then put adxp011a into a down state and then back up (recovery state). We will then take a look at the log file for this host and review the state changes and whether or not notifications were sent.
1. Open up the nagios configuration file /usr/local/nagios/etc/nagios.cfg, and set debug_level=32, and then re-start Nagios.
2. Put the adxpo11a into a down state and then a recovery.
2. Post or PM the nagios log data or the contents of the log file at /usr/local/nagios/var
nagios.log. You'll want to search the log data for host notification entries for adxp011a. The perl statement at the end will convert the unix timestamp into human readable text. Are notifications beings sent? If so, to the correct contacts?
Code: Select all
cat nagios.log | grep adxp011a | perl -pe 's/(\d+)/localtime($1)/e'
Main Configuration File Options
https://assets.nagios.com/downloads/nag ... gmain.html
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!
Re: Not getting Email alerts
@shamrozkadiwal, can you zip up the /usr/local/nagios directory and PM the zip file to me or any other member of the Nagios Support team? Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 74
- Joined: Thu Jan 25, 2018 1:13 am
Re: Not getting Email alerts
Please check your inboxlmiltchev wrote:@shamrozkadiwal, can you zip up the /usr/local/nagios directory and PM the zip file to me or any other member of the Nagios Support team? Thank you!