one shot check at specific time of day
Andreas Ericsson
ae at op5.se
Wed Mar 21 11:32:09 CET 2012
On 03/21/2012 11:13 AM, Marki wrote:
> Hi people,
>
> I have problems defining a check so that it only runs once each day (at a
> specified time).
>
> Inspired by
> http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg24221.html I tried
> define timeperiod {
> timeperiod_name tp_backupcheck
> alias mornin checks
> day 1 - -1 08:00-08:15
> }
> as well as
> define timeperiod {
> timeperiod_name tp_backupcheck
> alias mornin checks
> monday 08:00-08:15
> tuesday 08:00-08:15
> wednesday 08:00-08:15
> thursday 08:00-08:15
> friday 08:00-08:15
> saturday 08:00-08:15
> sunday 08:00-08:15
> }
>
> combined with
>
> define service {
> use normal
> host_name bla01
> service_description bla backup
> check_command check_bla_backup
> max_check_attempts 1
> check_interval 30
> check_period tp_backupciheck
> ...
> }
>
> Now it schedules the check each day for 07:58 or 07:59 or 07:59:58 or alike and
> obviously it is never run.
>
That's really odd. I wonder if we're randomizing unduly when scheduling
checks.
> How do I do this properly?
>
First thought; Set the check_interval to less than the checking window.
Assuming you're using minutes (like most people), the check_interval
should probably be something like 10, so it fits once but not twice
within the scheduled window.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
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