Module: check_mk
Branch: master
Commit: d7657a44d6eaf9678b142a3476598dbaab3933b2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d7657a44d6eaf9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Apr 30 15:34:41 2013 +0200
Fixed passive check interval mixup
---
modules/check_mk.py | 6 +++---
modules/check_mk_base.py | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 2d807c4..4a9837d 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -703,7 +703,7 @@ def check_interval_of(hostname, checkname):
return # no values at all for non snmp checks
for match, minutes in host_extra_conf(hostname, snmp_check_interval):
if match is None or match == checkname:
- return minutes * 60 # use first match
+ return minutes # use first match
def get_single_oid(hostname, ipaddress, oid):
# New in Check_MK 1.1.11: oid can end with ".*". In that case
@@ -1784,11 +1784,11 @@ def create_nagios_servicedefs(outfile, hostname):
# Add the check interval of either the Check_MK service or
# (if configured) the snmp_check_interval for snmp based checks
- check_interval = 60 # default hardcoded interval
+ check_interval = 1 # default hardcoded interval
# Customized interval of Check_MK service
values = service_extra_conf(hostname, "Check_MK",
extra_service_conf.get('check_interval', []))
if values:
- check_interval = int(values[0]) * 60
+ check_interval = int(values[0])
value = check_interval_of(hostname, checkname)
if value is not None:
check_interval = value
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 6bd27d6..a24a650 100755
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -340,7 +340,7 @@ def get_realhost_info(hostname, ipaddress, check_type, max_cache_age,
ignore_che
check_interval = check_interval_of(hostname, check_type)
if not ignore_check_interval \
and check_interval is not None and os.path.exists(cache_path) \
- and cachefile_age(cache_path) < check_interval:
+ and cachefile_age(cache_path) < check_interval * 60:
# cache file is newer than check_interval, skip this check
raise MKSkipCheck()