Page 1 of 1

Re: [Nagios-devel] Ways of having a passive only service with

Posted: Sat Feb 14, 2009 5:00 pm
by Guest
This is a multi-part message in MIME format.
--------------030003080505040206010609
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 13/02/09 08:45 AM, Thomas Lorenzen wrote:
> Hi'
>
> For passive only services I would like to use option
>
> check_period none
>
> instead of option
>
> active_checks_enabled 0
>
> since the latter gives rise to showing these checks as disabled in the
> "tactical overview", which the former does not. It is less confusing
> for our operators to not see anything being disabled.
>
> Now I have spiced these passive only checks up with freshness checkings,
> see docs/freshness.html, but it seems, that this only works, if I use
> "active_checks_enabled 0" instead of "check_period none". One might
> suspect that, but docs/timeperiods.html states, that "Note: On-demand
> checks and passive checks are not restricted by the timeperiod you
> specify in the check_period directive. Only regularly scheduled active
> checks are restricted.". Would you think, that freshness checking should
> also fall under that category.
>
> Also, the FAQ at
> http://www.nagios.org/faqs/viewfaq.php? ... desc=false
> seems to indicate, that using "check_period none" would be the right
> thing to do, but maybe that was true only in an earlier release.

You can try the patch attached, although I doubt Ethan will accept it.
He's the one who "Fixed" freshness checks running despite of timeperiod
in 2004:

commit eeb5ca93945994826afc921dc99c650bf5a3fc48
Author: Ethan Galstad
Date: Thu Jun 24 05:03:29 2004 +0000

Freshness checking timeperiod bug fix

OTOH many people complain about passive services showing as "Disabled"
in the tactical overview.

Another fix would be not to show them as disabled in the CGI if the
following conditions are true (any of them will prevent freshness checks
from running):
- Freshness checking is enabled globally
- Freshness checking is enabled on the service
- Passive checks are enabled
- Either check_interval or freshness interval is defined

I can do that if it's going into mainline.

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJlvij6dZ+Kt5BchYRAqMYAKDGB/Mqmhi9/YnlxhKuX2FUUHCIygCg0B0o
wGO5gKP+liVnBmiuH0ykY2U=
=LJ/9
-----END PGP SIGNATURE-----

--------------030003080505040206010609
Content-Type: text/x-diff;
name="freshness_checking_timeperiod.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="freshness_checking_timeperiod.patch"

diff --git a/base/checks.c b/base/checks.c
index 9d5c497..4d0f427 100644
--- a/base/checks.c
+++ b/base/checks.c
@@ -1978,9 +1978,9 @@ void check_service_result_freshness(void){
if(temp_service->is_being_freshened==TRUE)
continue;

- /* see if the time is right... */
+ /* see if the time is right... FIX: According to faq_id=271 we shouldn't.
if(check_time_against_period(current_time,temp_service->check_period_ptr)==ERROR)
- continue;
+ continue; */

/* EXCEPTION */
/* don't check freshness of services without regular check intervals if we're using auto-freshness threshold */

--------------030003080505040206010609--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]