Passive services with fixed check_time and freshness_threshold

Michael Hüttig Michael.Huettig at Medien-Systempartner.de
Tue Nov 11 15:44:15 CET 2003


Hi all,
it's a little bit difficult to explain for me, i hope for your patience:

i wan't to send daily-sms, to check wether SMS is ok, i defined a passive 
service as follows. With freshness-option this service goes one time a day in 
critical state and sends an sms to operating. After that, operating has to 
submit a passive check-result via WEB-Interface. 

My question is how to define a fixed time when the service-freshness times 
out? This should be every working day between 7:30 and 10:00 am.

Here the definitions:
______________________________________________
# Service definition passive
define service{
        host_name                               localhost
        service_description             Daily Test-SMS
        active_checks_enabled           0       ; Active service checks are 
enabled
        is_volatile                                     1
        check_freshness                         1
        check_period                            operating-workhour
        freshness_threshold             86400
        contact_groups                          operating-sms
        use                                             process-template
        check_command                   check_testsms
        }
______________________________________________
define service{
        use                                             generic-service         
        name                                            process-template
        is_volatile                                     0
        check_period                            24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        notification_interval                   10
        notification_period                     Produktiv-Systeme
        notification_options                    w,u,c,r
        register                                        0
        }
______________________________________________
# 'check_testsms' command definition fuer passiven Service
define command{
        command_name                    check_testsms
        command_line                            $USER1$/no_testsms.sh
        }
______________________________________________
#!/bin/sh
#       no_testsms.sh returns critical status
#       if NAGIOS-Freshness-check fails
#
#

/bin/echo "CRITICAL: No daily TEST-SMS was send"
exit 2
______________________________________________
# 'Operating' timeperiod definition
define timeperiod{
        timeperiod_name                 operating-workhour
        alias                                           operating-workhour
        monday                                  07:30-23:00
        tuesday                                         07:30-23:00
        wednesday                               07:30-23:00
        thursday                                        07:30-23:00
        friday                                          07:30-23:00
        }
______________________________________________

Thanks for your suggestions

Michael



**********************************************************************
Diese E-Mail wurde auf Viren ueberprueft.
www.mimesweeper.com
**********************************************************************



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.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