(no subject)
Alex Peeters
alex.peeters at citap.be
Mon Aug 23 08:14:04 CEST 2010
Dear Sire,
How can we configure into nagios dynamic thresholds depending on timeframes.
Example. -w = 80 -c = 90 during business hours but -w = 90 -c = 95
outsite business hours.
How can we configure into nagios dynamic thresholds depending on
timeframes: Part II
define service{
use local-service ; Name
of service template to use
host_name localhost
service_description Current Users
check_command check_local_users!20!50
check_period nonworkhours
notification_period nonworkhours
}
define service{
use local-service ; Name
of service template to use
host_name localhost
service_description Current Users
check_command check_local_users!40!60
check_period workhours
notification_period workhours
}
In my above example i dit configure the same test twice. The two
timeframes 'nonworkhours' en 'workhours' together equals 24x7
Is this way of configuring allowed. Because this solves my problem.
1) how will the nagios scheduling react on this configuration?
2) how will the display react on this configuration?
# 'workhours' timeperiod definition
define timeperiod{
timeperiod_name workhours
alias "Normal" Working Hours
monday 09:00-17:00
tuesday 09:00-17:00
wednesday 09:00-17:00
thursday 09:00-17:00
friday 09:00-17:00
}
# 'nonworkhours' timeperiod definition
define timeperiod{
timeperiod_name nonworkhours
alias Non-Work Hours
sunday 00:00-24:00
monday 00:00-09:00,17:00-24:00
tuesday 00:00-09:00,17:00-24:00
wednesday 00:00-09:00,17:00-24:00
thursday 00:00-09:00,17:00-24:00
friday 00:00-09:00,17:00-24:00
saturday 00:00-24:00
}
check_period: This directive is used to specify the short name of the
time period during which active checks of this host can be made.
check_period: This directive is used to specify the short name of the
time period during which active checks of this service can be made.
If you do not use the check_period directive to specify a timeperiod,
Nagios will be able to schedule active
checks of the host or service anytime it needs to. This is essentially
a 24x7 monitoring scenario.
Specifying a timeperiod in the check_period directive allows you to
restrict the time that Nagios perform
regularly scheduled, active checks of the host or service. When Nagios
attempts to reschedule a host or
service check, it will make sure that the next check falls within a
valid time range within the defined
timeperiod. If it doesnt, Nagios will adjust the next check time to
coincide with the next "valid" time in
the specified timeperiod. This means that the host or service may not
get checked again for another hour,
day, or week, etc.
Timeperiods:
Exclusions and Host/Service Checks - There is a bug in the
service/host check scheduling logic
that rears its head when you use timeperiod definitions that use the
excludedirective. The
problem occurs when Nagios Core tries to re-schedule the next check.
In this case, the
scheduling logic may incorrectly schedule the next check further out
in the future than it
should. In essence, it skips over the (missing) logic where it could
determine an earlier possible
time using the exception times. Imperfect Solution: Dont use
timeperiod definitions that
exclude other timeperods for your host/service check periods. A fix is
being worked on, and
will hopefully make it into a 3.4.x release.
Vriendelijke Groeten,
-- Alex Peeters
Section Supervision & Monitoring
Monitoring
02/787.57.27
P Please consider the environment - do you really need to print this email?
define service{
host_name host_name
hostgroup_name hostgroup_name
service_description service_description
display_name display_name
servicegroups servicegroup_names
is_volatile [0/1]
check_command command_name
initial_state [o,w,u,c]
max_check_attempts #
check_interval #
retry_interval #
active_checks_enabled [0/1]
passive_checks_enabled [0/1]
check_period timeperiod_name
obsess_over_service [0/1]
check_freshness [0/1]
freshness_threshold #
event_handler command_name
event_handler_enabled [0/1]
low_flap_threshold #
high_flap_threshold #
flap_detection_enabled [0/1]
flap_detection_options [o,w,c,u]
process_perf_data [0/1]
retain_status_information [0/1]
retain_nonstatus_information [0/1]
notification_interval #
first_notification_delay #
notification_period timeperiod_name
notification_options [w,u,c,r,f,s]
notifications_enabled [0/1]
contacts contacts
contact_groups contact_groups
stalking_options [o,w,u,c]
notes note_string
notes_url url
action_url url
icon_image image_file
icon_image_alt alt_string
}
http://nagios.sourceforge.net/docs/3_0/checkscheduling.html
Service and Host Check Scheduling
This documentation is being rewritten for Nagios 3. Stay tuned for
more information in a later beta release...
Vriendelijke Groeten,
-- Alex Peeters
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list