Freshness threshold

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Pratapa
Posts: 150
Joined: Tue Oct 01, 2019 1:33 am

Freshness threshold

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Freshness threshold

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Pratapa
Posts: 150
Joined: Tue Oct 01, 2019 1:33 am

Re: Freshness threshold

Post by Pratapa »

Thank you for your reply.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Freshness threshold

Post by scottwilkerson »

Pratapa wrote:Thank you for your reply.
no problem
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked