Module: check_mk
Branch: master
Commit: 72d527cd269888c860e37bd60a629ae2ca8d7469
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=72d527cd269888…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu May 19 14:49:51 2011 +0200
mbg_lantime_state: Handling refclock offsets correctly now; Changed default thresholds to 5/10 refclock offset
---
ChangeLog | 2 ++
checkman/mbg_lantime_state | 9 +++++----
checks/mbg_lantime_state | 12 +++++++++---
3 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 289eaa3..3dde4c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@
* brocade_port: check for Brocade FC ports has been rewritten with
lots of new features.
* AIX agent now simulates <<<netctr>>> output (by Jörg Linge)
+ * mbg_lantime_state: Handling refclock offsets correctly now; Changed
+ default thresholds to 5/10 refclock offset
Multisite:
* Introduced basic infrastructure for multilanguage support in Multisite
diff --git a/checkman/mbg_lantime_state b/checkman/mbg_lantime_state
index 372a0b0..f5befac 100644
--- a/checkman/mbg_lantime_state
+++ b/checkman/mbg_lantime_state
@@ -13,7 +13,8 @@ description:
The check raises a {CRITICAL} when the clock is in state {notSynchronized} or
{noGoodRefclock}. It also handles bad stratums and refclock offsets which can be
- configured.
+ configured. The refclock offset can either be a positive or negative integer.
+
inventory:
One check per device is created automatically.
@@ -24,13 +25,13 @@ stratum_warn (int): stratums above this value will raise a {WARNING} state.
stratum_warn (int): stratums above this value will raise a {CRITICAL} state.
The default is set to {0}. The threshold can be disabled by setting to {None}.
ref_offset_warn (int): refclock offsets above this value will raise a {WARNING} state.
- The default is set to {0}. The threshold can be disabled by setting to {None}.
+ The default is set to {5}. The threshold can be disabled by setting to {None}.
ref_offset_crit (int): refclock offsets above this value will raise a {CRITICAL} state.
- The default is set to {0}. The threshold can be disabled by setting to {None}.
+ The default is set to {10}. The threshold can be disabled by setting to {None}.
[configuration]
mbg_lantime_state_default_levels (int, int, int, int): A tuple of four floats or integers: The default
levels. These levels are used for inventorized checks. This variable
- is preset to {(0, 0, 0, 0)}
+ is preset to {(0, 0, 5, 10)}
diff --git a/checks/mbg_lantime_state b/checks/mbg_lantime_state
index 4430a67..07335f8 100644
--- a/checks/mbg_lantime_state
+++ b/checks/mbg_lantime_state
@@ -35,7 +35,7 @@ mbg_lantime_state_statemap = {
}
# stratum, refclock_offset
-mbg_lantime_state_default_levels = (0, 0, 0, 0)
+mbg_lantime_state_default_levels = (0, 0, 5, 10)
def inventory_mbg_lantime_state(checkname, info):
if len(info) > 0 and len(info[0]) == 5:
@@ -69,10 +69,16 @@ def check_mbg_lantime_state(item, params, info):
state_txt.append('Refclock: %s (%s)' % (refclock_name, refclock_id))
thr_txt = ''
- if params[2] is not None and int(refclock_offset) > params[3]:
+
+ if refclock_offset < 0:
+ pos_refclock_offset = refclock_offset * -1
+ else:
+ pos_refclock_offset = refclock_offset
+
+ if params[2] is not None and int(pos_refclock_offset) > params[3]:
state = max(state, 2)
thr_txt = ' (!!)'
- elif params[3] is not None and int(refclock_offset) > params[2]:
+ elif params[3] is not None and int(pos_refclock_offset) > params[2]:
state = max(state, 1)
thr_txt = ' (!)'
state_txt.append('Refclock Offset: %sms%s' % (refclock_offset, thr_txt))
Module: check_mk
Branch: master
Commit: 14bc695e351ce68bfa1a34582efab4d976b7809d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=14bc695e351ce6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 26 10:11:42 2011 +0200
Cleaned up internal docu
---
BUGS.bi | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/BUGS.bi b/BUGS.bi
deleted file mode 100644
index 9abb474..0000000
--- a/BUGS.bi
+++ /dev/null
@@ -1,7 +0,0 @@
-Habe in bi.py alles auskommentiert. Trotzdem erscheinen die Aggregationen
-in der GUI noch. Nur wenn ich explizit aggregations = [] setze, ist alles
-weg. Kann man das in den Griff bekommen?
-
-Wenn man einen Host explizit angibt, muss man zwingend die Site
-vom dem Doppelpunkt angeben. Das verwirrt. Bei weglassen muss
-automatisch alle Sites danach durchsuchen.