[Nagios-users] one shot check at specific time of day
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 thursday08:00-08:15 friday 08:00-08:15 saturday08: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_periodtp_backupcheck ... } 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. How do I do this properly? Thanks Marki -- 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@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
Re: [Nagios-users] one shot check at specific time of day
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 thursday08:00-08:15 friday 08:00-08:15 saturday08: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_periodtp_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.erics...@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@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
Re: [Nagios-users] one shot check at specific time of day
Andreas Ericsson ae at op5.se writes: I have problems defining a check so that it only runs once each day (at a specified time). 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. That seems to help. Sidenote: day 1 - -1 doesn't work at all. If used today, it sets next scheduled time to April 1. Haha. -- 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@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
Re: [Nagios-users] one shot check at specific time of day
On 3/21/2012 6:13 AM, Marki wrote: Hi people, I have problems defining a check so that it only runs once each day (at a specified time). If setting the check_period doesn't work out and you can tolerate the check being run more often, you can set the notification_period to a smaller time period instead. The state shown in the web interface will be more up-to-date, which may be different from the last notification sent out. For example, I get notified of expiring SSL certificates once per day, starting a month before they actually expire. If I replace an expiring certificate, the web interface will let me know if the replacement was successful without having to wait until tomorrow to find out. -- -Chris Nothing in this message is intended to make or accept an offer or to form a contract, except that an attachment that is an image of a contract bearing the signature of an officer of our company may be or become a contract. This message (including any attachments) is intended only for the use of the individual or entity to whom it is addressed. It may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, we hereby notify you that any use, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this message in error, please notify us immediately by telephone and delete this message immediately. Thank you. -- 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@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
Re: [Nagios-users] one shot check at specific time of day
-Original Message- From: Marki [mailto:jm+nagios-us...@roth.lu] Sent: Wednesday, 21 March 2012 9:13 PM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] one shot check at specific time of day Hi people, I have problems defining a check so that it only runs once each day (at a specified time). snip If it's just to run once a day, why not use cron and submit a passive check result, with a 24hr freshness window? Thanks Marki Stuart -- 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@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