Page 1 of 1

NCPA - Passive Checks

Posted: Mon Feb 26, 2018 7:02 am
by charangandra
Hi,

I am using NCPA Passive check to monitor my remote host. However this morning my remote host went down and I didn't receive any notification and Nagios core is still showing remote host as up but the last check time was just before the shutdown of remote host. I am just confused what is the use of passive checks if nagios doesn't if a remote host is down or not? Or Am I missing something here?

Any help is greatly appreciated.

Thanks,

Re: NCPA - Passive Checks

Posted: Mon Feb 26, 2018 10:54 am
by tmcdonald
You will want to look into Freshness Checking: https://assets.nagios.com/downloads/nag ... hness.html

Basically it forces an active check if the passive check results have not come back within X seconds.

Re: NCPA - Passive Checks

Posted: Mon Feb 26, 2018 11:23 am
by charangandra
Thanks for the reply, unfortunately I am new to Nagios and I couldn't figure it out how and where to define host and service defnition as specified in the article.

Is there any article with examples, so I can try to use it?

Thanks,
Charan

Re: NCPA - Passive Checks

Posted: Tue Feb 27, 2018 11:35 am
by cdienger
The link provided contained an example:

Code: Select all

define service {
    host_name               backup-server
    service_description     ArcServe Backup Job
    active_checks_enabled   0                   ; active checks are NOT enabled
    passive_checks_enabled  1                   ; passive checks are enabled (this is how results are reported)
    check_freshness         1
    freshness_threshold     93600               ; 26 hour threshold, since backups may not always finish at the same time
    check_command           no-backup-report    ; this command is run only if the service results are "stale"
    other options ...
}

Code: Select all

define command {
    command_name    no-backup-report
    command_line    /usr/local/nagios/libexec/check_dummy 2 "CRITICAL: Results of backup job were not reported!"
}
If you still have problems after reviewing this again, please provide a copy of the config file containing the host/service definition. This will usually be under /usr/local/nagios/etc/objects/.