Page 1 of 1

Freshness threshold

Posted: Thu Feb 20, 2020 1:44 am
by Pratapa
I would like to understand the following service defintion. Please make me to understand

define service {
use network-service-passive-template
service_description AWSM Configuration Backup
host_name host1
freshness_threshold 657500 ; Service is deemed stale after 7 days
check_command check_passive_warning!"Nagios has not received an update from $HOSTNAME$ for at least 25 hours"
}


define command {
command_name check_passive_warning
command_line $USER1$/check_dummy 1 $ARG1$
}

To my understanding Service check "AWSM Configuration Backup" is a passive check.

host1 will send the results of the backup to Nagios server. If Nagios server does not receive the results within 657500 seconds, then check command check_passive_warning will be executed.
check command check_passive_warning will execute the plugin check_dummy which takes two arguments 1 and "Nagios has not received an update from $HOSTNAME$ for at least 25 hours".
1 is for Warning and the second argument is the text message.
If the Nagios does not receive the results within 657500 seconds from the Last check, then the service will be in Warning state with the text message (second argument).

My question is
1. This service check should be a passive check.
2. Is "check_freshness 1" should be included in the service defintion for freshness_threshold to work.
3. If the backup is executed on host1 and sending the results of the backup to the Nagios server, where the results of the backup is stored in Nagios server and how the Nagios server will check.

Re: Freshness threshold

Posted: Thu Feb 20, 2020 2:42 pm
by scottwilkerson
Pratapa wrote:1. This service check should be a passive check.
If it isn't already specified in your template, you should also add the following to the service definition

Code: Select all

    active_checks_enabled     0
    passive_checks_enabled    1
Pratapa wrote:2. Is "check_freshness 1" should be included in the service defintion for freshness_threshold to work.
yes
Pratapa wrote:3. If the backup is executed on host1 and sending the results of the backup to the Nagios server, where the results of the backup is stored in Nagios server and how the Nagios server will check.
In memory and in the status.dat file

Re: Freshness threshold

Posted: Fri Feb 21, 2020 12:15 am
by Pratapa
Thank you for your reply.

Re: Freshness threshold

Posted: Fri Feb 21, 2020 7:36 am
by scottwilkerson
Pratapa wrote:Thank you for your reply.
no problem