Freshness Checking

Link King king at kinger.net
Fri May 2 22:06:29 CEST 2003


Ok, I've got a distributed server that I'm running a number of checks on
for a remote location.  I've got nsca setup and things are all working
appropriately with the exception of freshness checking.

Since the central server can not actively run these checks I've done as
outlined in the documentation and setup freshness checking and a
service-is-stale script to let me know when I stop receiving info from the
remote host.

Problem is, no matter what I set the freshness_threshold to for a
particular service I still get service alerts for stale results even
though the results aren't stale.  I can actually see service alerts for
stale results appear right after a succesful service check.  I'm hoping
somebody can help me with my config.  Here's an exampe of one
host/service check I've got.

Remote server
-------------
hosts.cfg:

define host{
        name                    servers
        host_name               server1
        alias                   Name Server 1
        address                 192.168.0.1
        check_command           check-host-alive
        max_check_attempts      5
        notification_interval   30
        notification_period     24x7
        notification_options    d,u,r
        }

services.cfg:

define service{
        name                            check-dns
        host_name                       server1
        service_description             DNS
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  ops
        notification_interval           30
        notification_period             24x7
        notification_options            c,r
        check_command                   check_dns
        }

Central Server
--------------
hosts.cfg:

define host{
        name                    distributed
        host_name               server1
        alias                   Name Server 1
        address                 192.168.0.1
        parents                 router
        max_check_attempts      3
        notification_interval   30
        notification_period     24x7
        notification_options    d,u,r
        }

services.cfg:

define service{
        name                            service_distributed
        host_name                       server1
        service_description             DNS
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  ops
        notification_interval           30
        notification_period             24x7
        notification_options            c,r
        active_checks_enabled           0
        passive_checks_enabled          1
        check_freshness                 1
        freshness_threshold             300
        check_command                   service-is-stale
        }

checkcommands.cfg:

define command{
        command_name    service-is-stale
        command_line    /usr/local/nagios/libexec/service-is-stale.sh
        }

service-is-stale.sh:

#!/bin/sh

/bin/echo "CRITICAL: Service results are stale!"

exit 2


Link King
king at kinger.net


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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