Hello,
I' setting up a different notification alert setting for my dev servers to only aletr during business hours. I have the host configured to only alert on a work hour time period and service checks with disabled notification alerts, however we are still getting alerts outside of the host notification alerts settings.
- Can you see any incorrect setting?
- Is it required to have 2 contacts? (1 for 24/7 and another for desired time)
HOST:
define host {
host_name host1
address xxx.xx.xx.xx
max_check_attempts 5
check_interval 5
retry_interval 1
check_period workhours_linux
contacts nagiosadmin
contact_groups linuxadmin
notification_interval 60
notification_period workhours_linux
first_notification_delay 0
notification_options d,r,s,
notifications_enabled 1
icon_image hp_ux.png
statusmap_image hp_ux.png
_xiwizard linuxsnmp
register 1
}
Checks: notification alert is off in Alert settings tab)
define service {
service_description tmp Disk Usage
hostgroup_name hostgroup1 (host1 is a member of this group)
check_command check_nrpe!check_tmp!!!!!!!
max_check_attempts 3
check_interval 3
retry_interval 1
check_period 24x7
notification_interval 30
first_notification_delay 0
notifications_enabled 0
_xiwizard nrpe
register 1
}
CONTACt:
define contact {
contact_name linuxadmin
alias admin1
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24/7
service_notification_period 24/7
host_notification_options d,u,r,f,s,
service_notification_options c,r,s,
can_submit_commands 1
email email_address
use xi_contact_generic (service notifiaction is skipped on this template)
}
Notification Alerts
Re: Notification Alerts
In your host definition, you have:
Is the linuxadmin" contact a member of the "linuxadmin" contactgroup? This is not very clear. It's not a good practice to name the contact and the contactgroup with exactly the same names.contact_groups linuxadmin
Also, can you post the "workhours_linux" timeperiod's definition and show us the actual email notification that you received?define contact {
contact_name linuxadmin
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Notification Alerts
HI,
I was making the post as generic as I can, we have names configured differently in our set up and just changed to linuxadmin on this post.
Here is the email we got (changed the ips/hostname)
From: nagios01@zzzz [mailto:nagios01@zzzzz]
Sent: Friday, March 20, 2015 7:38 PM
To: linuxadmin
Subject: PROBLEM (CRITICAL) host1 HP-UX /tmp
Importance: High
Nagios has detected a problem with this service.
CHECK_NRPE: Socket timeout after 30 seconds.
(host1) IP: xxx.xx.xx.xx
2015-03-20 19:38:01
and here is the timeperiod definition:
define timeperiod {
timeperiod_name workhours_linux
alias Normal Linux Work Hours
friday 05:00-19:00
thursday 05:00-19:00
wednesday 05:00-19:00
tuesday 05:00-19:00
monday 05:00-19:00
}
Thanks,
I was making the post as generic as I can, we have names configured differently in our set up and just changed to linuxadmin on this post.
Here is the email we got (changed the ips/hostname)
From: nagios01@zzzz [mailto:nagios01@zzzzz]
Sent: Friday, March 20, 2015 7:38 PM
To: linuxadmin
Subject: PROBLEM (CRITICAL) host1 HP-UX /tmp
Importance: High
Nagios has detected a problem with this service.
CHECK_NRPE: Socket timeout after 30 seconds.
(host1) IP: xxx.xx.xx.xx
2015-03-20 19:38:01
and here is the timeperiod definition:
define timeperiod {
timeperiod_name workhours_linux
alias Normal Linux Work Hours
friday 05:00-19:00
thursday 05:00-19:00
wednesday 05:00-19:00
tuesday 05:00-19:00
monday 05:00-19:00
}
Thanks,
Re: Notification Alerts
It's difficult to try to guess which names are "real" and which are "generic".I was making the post as generic as I can...
Is the "host1 HP-UX" same as "host1"? Is "tmp Disk Usage" same as "/tmp"? Notifications are disabled for the " tmp Disk Usage" service, so you shouldn't be getting alerts. Can you check if you have any multiple instances of nagios running?
Code: Select all
ps -ef | grep [b]in/nagiosBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Notification Alerts
1. Is the "host1 HP-UX" same as "host1" == yes this is correct.
2. /tmmp Disk Usage" same as "/tmp"? Notifications are disabled for the " tmp Disk Usage" service === when the Notification Alerts tab is set to off, this will not inherit the setting for the HOST NOTIFICATION ALERT setting?
- does this mean that I need to define 2 service check for /tmp? One for 24/7 notification alerts and another /tmp service check but for "work hours" notification setting?
3. Can you check if you have any multiple instances of nagios running === Just 1 instance.
2. /tmmp Disk Usage" same as "/tmp"? Notifications are disabled for the " tmp Disk Usage" service === when the Notification Alerts tab is set to off, this will not inherit the setting for the HOST NOTIFICATION ALERT setting?
- does this mean that I need to define 2 service check for /tmp? One for 24/7 notification alerts and another /tmp service check but for "work hours" notification setting?
3. Can you check if you have any multiple instances of nagios running === Just 1 instance.
Re: Notification Alerts
When you have:
in the service definition, the notifications will be disabled. See how this directive is used:
Can you email us your profile at [email protected]?
Admin->System Profile->Download Profile->save and email the "porfile.zip".
We will need to move this to our email ticketing system to further troubleshoot the issue. Thanks!
Code: Select all
notifications_enabled 0Code: Select all
http://nagios.sourceforge.net/docs/nagioscore/4/en/objectdefinitions.html#serviceAdmin->System Profile->Download Profile->save and email the "porfile.zip".
We will need to move this to our email ticketing system to further troubleshoot the issue. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!