One Time Check

Sean McAfee smcafee at collaborativefusion.com
Fri Feb 6 17:53:13 CET 2009


Stewart, Tom wrote:
> I've got a question for everyone...
>
> We're using Nagios that we use for a bunch of different types of checks.  However, we have one check that we only want to run once a day.  What can we do in Nagios to keep this from checking throughout the day?
>
> Thanks.
>
> Tom
I have something similar that needs to run twice a day.  I used time 
periods and a service template to control when it runs:

define timeperiod{
        timeperiod_name twicedaily
        alias           For Running 2x Daily
        monday          08:40-09:00,19:50-20:10
        tuesday         08:40-09:00,19:50-20:10
        wednesday       08:40-09:00,19:50-20:10
        thursday        08:40-09:00,19:50-20:10
        friday          08:40-09:00,19:50-20:10
        saturday        08:40-09:00,19:50-20:10
        sunday          08:40-09:00,19:50-20:10
        }

define service{
        name                          generic-twice-daily
        use                           generic-service
        normal_check_interval         30
        register                      0
        max_check_attempts            1
        check_period                  twicedaily
        }

All checks using this template kick off at 8:40 & 19:50.  Since 
normal_check_interval is greater than the time period windows, it will 
only run once per window.

If there's a better way to do it, I'd like to know as well.

-- 
Sean McAfee
System Engineer


****************************************************************
IMPORTANT: This message contains confidential information
and is intended only for the individual named. If the reader of
this message is not an intended recipient (or the individual
responsible for the delivery of this message to an intended
recipient), please be advised that any re-use, dissemination,
distribution or copying of this message is prohibited. Please
notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a
result of e-mail transmission.
****************************************************************




IMPORTANT: This message contains confidential information and is intended only for the individual named. If the reader of this message is not an intended recipient (or the individual responsible for the delivery of this message to an intended recipient), please be advised that any re-use, dissemination, distribution or copying of this message is prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
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