Page 2 of 2
Re: Time Period Management
Posted: Thu Nov 03, 2016 4:58 pm
by bwallace
Assuming 'HUP' is the timeperiod in question, it looks fine for these services:
MSSQL Query - HUP.HDMA, MSSQL Query - HUP.LuAdmitType, MSSQL Query - HUP.TransferDate,
..where 'PMC' is applied to the other services.
Can you post the definition files for contacts blawrence, Brent Moore?
Re: Time Period Management
Posted: Fri Nov 04, 2016 7:07 am
by brettmlawrence
Code: Select all
###############################################################################
#
# Contact configuration file
#
# Created by: Nagios Core Config Manager 2.6.1
# Date: 2016-11-04 08:06:35
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define contact {
contact_name blawrence
alias Brett Lawrence
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period blawrence_notification_times
service_notification_period blawrence_notification_times
host_notification_options d,u,r,f,s,
service_notification_options w,u,c,r,f,s,
email [email protected]
use xi_contact_generic
}
define contact {
contact_name Brent Moore
host_notification_period workhours
host_notification_options d,u,r,f,s,
service_notification_options w,u,c,r,f,s,
host_notification_commands check-host-alive-tftp,check_none,notify-host-by-email,notify-service-by-email,process-host-perfdata-file-bulk,process-host-perfdata-file-pnp-bulk,process-host-perfdata-pnp-normal,process-service-perfdata-file-bulk,process-service-perfdata-file-pnp-bulk,process-service-perfdata-pnp-normal,xi_host_event_handler,xi_host_notification_handler,xi_service_event_handler,xi_service_notification_handler
service_notification_commands check-host-alive-tftp,check_none,notify-host-by-email,notify-service-by-email,process-host-perfdata-file-bulk,process-host-perfdata-file-pnp-bulk,process-host-perfdata-pnp-normal,process-service-perfdata-file-bulk,process-service-perfdata-file-pnp-bulk,process-service-perfdata-pnp-normal,xi_host_event_handler,xi_host_notification_handler,xi_service_event_handler,xi_service_notification_handler
email [email protected]
}
###############################################################################
#
# Contact configuration file
#
# END OF FILE
#
###############################################################################
Re: Time Period Management
Posted: Fri Nov 04, 2016 11:47 am
by bwallace
Thanks for all the files. I see you have a different notification_period on each object:
Some of your services use the 'PMC' check_period and notification_ period of 00:00-16:00,17:00-24:00
...while others use 'HUP' check_period and notification_period of 00:00-21:00,22:00-23:59
The host UPHSCISTAGESQL uses:
check_period xi_timeperiod_24x7
notification_period xi_timeperiod_24x7
The timeperiods for 'blawrence' in the contact definition are:
host_notification_period blawrence_notification_times (00:00-24:00)
service_notification_period blawrence_notification_times (00:00-24:00)
Now this should work just fine although it can get difficult to track when so many check_periods + notification _periods are involved. Can you post the notification email you received when you felt it should've NOT been sent?
You can also find a record of the notification in the UI under Home > Incident Management > Notifications...can you post a screenshot of that and let us know what host/service name to focus on?
We'll have to start at that level and examine its settings -thanks -
Re: Time Period Management
Posted: Fri Nov 04, 2016 12:21 pm
by brettmlawrence
So PMC and HUP are different databases on the same server. They are expected to fail during the ETL process during the scheduled times. I have attached the notification reports. We can look at any one of the services. Once I have one figured out I should be able to figure the rest.
The idea is I want to schedule down times by the service.. So any of the sevices that start with PMC.____ should follow the PMC time period and HUP.___ should follow HUP.
I'd assume that since these are on the same Hosts I should clear the notification and alert time periods for that host. Also since both myself and Brent Moore will likely be receiving notifications on many different Hosts/Services they too should be cleared at the Contact level..
Re: Time Period Management
Posted: Fri Nov 04, 2016 2:15 pm
by bwallace
So based on the screenshot of the Notification log/report, this is working as expected.
host_name UPHSCISTAGESQL
service_description MSSQL Query - HUP.HDMA
is set to use:
check_period HUP
notification_period HUP
HUP is defined as daily from 00:00-21:00,22:00-23:59
All of the entries in the screenshot fall within that range.
Also, I would clean this up -- the Brent Moore contact has too many notification handlers enabled. If he is an XI user then set his Host Notification command to 'xi_host_notification_handler' and for his service notifications set it to 'xi_service_notification_handler' For more detai lon this see page 3 of this doc:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Re: Time Period Management
Posted: Mon Nov 07, 2016 10:09 am
by brettmlawrence
Ok. thank you!
If I am able to define them as such should I leave the notification and Check periods blank for the hosts and just have them filled in for the services? I have a few other instances where services should use different time periods.
Re: Time Period Management
Posted: Mon Nov 07, 2016 12:18 pm
by bwallace
You're welcome - Yes that too would clean things up, by defining everything at the service level.