Module: check_mk
Branch: master
Commit: 7bb399fa9524571a6e0ad9ab49dfd5aa348e3d2a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7bb399fa952457…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Tue Aug 26 11:40:29 2014 +0200
#0650 FIX f5_bigip_pool: limits to the number of active nodes are now correctly applied
limits to the number of active nodes are now applied more intuitively and consistent
with the WATO rule. This will also lead to a more reasonable behaviour of the check
in case of a cluster of two nodes with the default limits of (1,2): a warning level will
be set in there is one node, and a critical level if there are no nodes left.
---
.werks/650 | 13 +++++++++++++
ChangeLog | 2 ++
checkman/f5_bigip_pool | 16 ++++++++++------
checks/f5_bigip_pool | 6 +++---
4 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/.werks/650 b/.werks/650
new file mode 100644
index 0000000..b50065b
--- /dev/null
+++ b/.werks/650
@@ -0,0 +1,13 @@
+Title: f5_bigip_pool: limits to the number of active nodes are now correctly applied
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.5i6
+Date: 1409045579
+Class: fix
+
+limits to the number of active nodes are now applied more intuitively and consistent
+with the WATO rule. This will also lead to a more reasonable behaviour of the check
+in case of a cluster of two nodes with the default limits of (1,2): a warning level will
+be set in there is one node, and a critical level if there are no nodes left.
+
diff --git a/ChangeLog b/ChangeLog
index 2b7b6b5..f03fbdd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,8 @@
* 1145 FIX: windows_tasks: handle case correctly where task is currently running...
* 1378 FIX: mk_logwatch: remove exceeding \n when rewriting message and using \0...
* 1147 FIX: upc_capacity, ups_socomec_capacity: Fix checking of battery left levels...
+ * 0650 FIX: f5_bigip_pool: limits to the number of active nodes are now correctly applied...
+ NOTE: Please refer to the migration notes!
Multisite:
* 1066 Implemented Dashboard Designer...
diff --git a/checkman/f5_bigip_pool b/checkman/f5_bigip_pool
index d39aef7..d20cea3 100644
--- a/checkman/f5_bigip_pool
+++ b/checkman/f5_bigip_pool
@@ -13,8 +13,8 @@ description:
It supports devices running the 9.0 and above releases of the F5 OS. It's
tested against 9.3 devices.
- If the number of down nodes is warn or crit, the names of the nodes are
- also printed in the service output.
+ If there are down nodes, the names of the nodes are also printed in the
+ service output.
examples:
# Let the Pool named ABC on your first F5 be in WARNING state when it reaches 5 active members or in CRITICAL for anything between 3 and 0.
@@ -24,12 +24,16 @@ examples:
inventory:
- The check gather a list of the pools defined on a system. It will include non-enabled ones,
- as this is considered a temporary state.
+ The check collects a list of the pools defined on a system. It will include
+ non-enabled ones, as this is considered a temporary state.
[parameters]
-warning (int): Issue a warning if there's this many or less members left in a load balancing pool
-crit (int): Go to critical state if there's this many members left in a load balancing pool. Note: 0 active members will always result in a critical state.
+warning (int): issue a warning if there are less than warn members left in
+a load balancing pool
+
+crit (int): go to critical state if there are less than crit members left
+in a load balancing pool. Note: 0 active members will always result in a
+critical state.
[configuration]
f5_bigip_pool_default_levels = (int, int): The default levels for all F5 BIG-IP pool checks. This is preset to {(2, 1)}.
diff --git a/checks/f5_bigip_pool b/checks/f5_bigip_pool
index 57195d4..9a4367a 100644
--- a/checks/f5_bigip_pool
+++ b/checks/f5_bigip_pool
@@ -65,12 +65,12 @@ def check_f5_bigip_pool(item, params, info):
pool_def_members = int(line[2])
message = "%d of %d members are up" % ( pool_act_members, pool_def_members )
state = 0
- if pool_act_members == pool_def_members or pool_act_members > warn:
+ if pool_act_members == pool_def_members or pool_act_members >= warn:
state = 0
- elif pool_act_members <= crit:
+ elif pool_act_members < crit:
state = 2
message += " (warn/crit: %s/%s)" % ( warn, crit )
- elif pool_act_members <= warn:
+ elif pool_act_members < warn:
state = 1
message += " (warn/crit: %s/%s)" % ( warn, crit )
Module: check_mk
Branch: master
Commit: fb772447ab8556f4ea8e75a049caee0a51489046
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fb772447ab8556…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Aug 26 10:45:34 2014 +0200
#1099 FIX tsm_scratch: now returns the variable name instead the values during inventory
In the previous version the parameter values got hardcoded up to the next inventory of this host
---
.werks/1099 | 9 +++++++++
ChangeLog | 2 ++
checks/tsm_scratch | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1099 b/.werks/1099
new file mode 100644
index 0000000..1cf9564
--- /dev/null
+++ b/.werks/1099
@@ -0,0 +1,9 @@
+Title: tsm_scratch: now returns the variable name instead the values during inventory
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1409042591
+Class: fix
+
+In the previous version the parameter values got hardcoded up to the next inventory of this host
diff --git a/ChangeLog b/ChangeLog
index 2b7b6b5..dcb45f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,7 @@
* 1145 FIX: windows_tasks: handle case correctly where task is currently running...
* 1378 FIX: mk_logwatch: remove exceeding \n when rewriting message and using \0...
* 1147 FIX: upc_capacity, ups_socomec_capacity: Fix checking of battery left levels...
+ * 1099 FIX: tsm_scratch: now returns the variable name instead the values during inventory...
Multisite:
* 1066 Implemented Dashboard Designer...
@@ -67,6 +68,7 @@
* 1154 FIX: Availability: Fixed unwanted redirect to edit annotation page after editing availability options...
WATO:
+ * 1095 New WATO Web-API: Now able to manage hosts via web automation calls
* 1096 New WATO webservices: manage hosts via webinterface...
* 1155 NagVis map edit/view permissions can now be set using roles...
* 1064 FIX: Fixed rare issue with WATO communication in distributed setups (different OS versions)...
diff --git a/checks/tsm_scratch b/checks/tsm_scratch
index 1cfa9cb..6d8997d 100644
--- a/checks/tsm_scratch
+++ b/checks/tsm_scratch
@@ -36,7 +36,7 @@ def inventory_tsm_scratch(info):
item = "%s / %s" % ( inst, library )
else:
item = library
- inventory.append((item, tsm_scratch_default_levels))
+ inventory.append((item, "tsm_scratch_default_levels"))
return inventory
Module: check_mk
Branch: master
Commit: 3a7e5da2fac9585c6daebe348f45267dcde75cd8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3a7e5da2fac958…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Aug 25 15:36:09 2014 +0200
#1147 FIX upc_capacity, ups_socomec_capacity: Fix checking of battery left levels
The fixes the execution of the levels for <i>Time left on battery</i>. These
levels where internally compared against the <t>Time running on battery</i>
- which is obviously quite the opposite.
Example: If you configure a warning level of <tt>50</tt> minutes for <i>Time
left on battery</i> then the check gets critical if the estimated remaining
battery time is 50 minutes or less.
---
.werks/1147 | 16 +++++++++++++
ChangeLog | 1 +
checks/ups_capacity.include | 42 +++++++++++++++++++---------------
web/plugins/wato/check_parameters.py | 12 +++++-----
4 files changed, 46 insertions(+), 25 deletions(-)
diff --git a/.werks/1147 b/.werks/1147
new file mode 100644
index 0000000..c1c4065
--- /dev/null
+++ b/.werks/1147
@@ -0,0 +1,16 @@
+Title: upc_capacity, ups_socomec_capacity: Fix checking of battery left levels
+Level: 2
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1408973618
+Class: fix
+
+The fixes the execution of the levels for <i>Time left on battery</i>. These
+levels where internally compared against the <t>Time running on battery</i>
+- which is obviously quite the opposite.
+
+Example: If you configure a warning level of <tt>50</tt> minutes for <i>Time
+left on battery</i> then the check gets critical if the estimated remaining
+battery time is 50 minutes or less.
+
diff --git a/ChangeLog b/ChangeLog
index d1b6b9f..2b7b6b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -58,6 +58,7 @@
NOTE: Please refer to the migration notes!
* 1145 FIX: windows_tasks: handle case correctly where task is currently running...
* 1378 FIX: mk_logwatch: remove exceeding \n when rewriting message and using \0...
+ * 1147 FIX: upc_capacity, ups_socomec_capacity: Fix checking of battery left levels...
Multisite:
* 1066 Implemented Dashboard Designer...
diff --git a/checks/ups_capacity.include b/checks/ups_capacity.include
index 9c9a33b..fd175d5 100644
--- a/checks/ups_capacity.include
+++ b/checks/ups_capacity.include
@@ -30,36 +30,40 @@ def check_ups_capacity(item, params, info):
warn, crit = params
cap_warn, cap_crit = (95, 90)
elif type(params) is dict: # new dict format
- warn,crit = params.get('battime',(0,0))
- cap_warn,cap_crit = params.get('capacity',(95,90))
+ warn, crit = params.get('battime', (0, 0))
+ cap_warn, cap_crit = params.get('capacity', (95, 90))
else:
warn, crit = (0, 0)
cap_warn, cap_crit = (95, 90)
time_on_bat, minutes_left, percent_fuel = map(int, info[0])
- perf = [
- ('capacity', minutes_left, warn, crit),
- ('percent', percent_fuel),
- ]
- state = 0
- time_label = ""
- cap_label = ""
- if time_on_bat > crit:
+ # Check time left on battery
+ levelsinfo = ""
+ if minutes_left <= crit:
state = 2
- time_label = "On battery since %ds (levels at %ds/%ds)(!!), " % (time_on_bat, warn, crit)
- elif time_on_bat > warn:
+ levelsinfo = " (crit at %d min)" % cap_crit
+ elif minutes_left < warn:
state = 1
- time_label = "On battery since %ds (levels at %ds/%ds)(!)" % (time_on_bat, warn, crit)
- if percent_fuel < cap_crit:
+ levelsinfo = " (warn at %d min)" % cap_warn
+ else:
+ state = 0
+ yield state, "%d min left on battery" % minutes_left + levelsinfo, [ ('capacity', minutes_left, warn, crit) ]
+
+ # Check percentual capacity
+ levelsinfo = ""
+ if percent_fuel <= cap_crit:
state = 2
- cap_label = "(!!)"
+ levelsinfo = " (crit at %d%%)" % cap_crit
elif percent_fuel < cap_warn:
state = 1
- cap_label = "(!)"
+ levelsinfo = " (warn at %d%%)" % cap_warn
+ else:
+ state = 0
+ yield state, "capacity: %d%%" % percent_fuel + levelsinfo, [ ('percent', percent_fuel, cap_warn, cap_crit) ]
- info_text = "%sremaining capacity %dmin, percentage %d%% (%d/%d) %s" \
- % (time_label, minutes_left, percent_fuel, cap_warn, cap_crit, cap_label )
- return(state, info_text, perf)
+ # Output time on battery
+ if time_on_bat > 0:
+ yield 0, "On battery for %d min" % time_on_bat
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 5e9a3fd..7f92ba5 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -4968,16 +4968,16 @@ register_check_parameters(
elements = [
("capacity",
Tuple(
- title = _("Battery Capacity"),
+ title = _("Battery capacity"),
elements = [
Integer(
- title = _("Warning Level"),
+ title = _("Warning at"),
help = _("The battery capacity in percent at and below which a warning state is triggered"),
unit = "%",
default_value = 95,
),
Integer(
- title = _("Critical Level"),
+ title = _("Critical at"),
help = _("The battery capacity in percent at and below which a critical state is triggered"),
unit = "%",
default_value = 90,
@@ -4987,16 +4987,16 @@ register_check_parameters(
),
("battime",
Tuple(
- title = _("Time Left on Battery"),
+ title = _("Time left on battery"),
elements = [
Integer(
- title = _("Warning Level"),
+ title = _("Warning at"),
help = _("Time left on Battery at and below which a warning state is triggered"),
unit = _("min"),
default_value = 0,
),
Integer(
- title = _("Critical Level"),
+ title = _("Critical at"),
help = _("Time Left on Battery at and below which a critical state is triggered"),
unit = _("min"),
default_value = 0,
Module: check_mk
Branch: master
Commit: ba7a7a8e52d32ba463e15960eb82de65c17cd544
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ba7a7a8e52d32b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Aug 25 15:40:00 2014 +0200
Fix man pages of up_*capacity
---
checkman/ups_capacity | 22 +++++++++-------------
checkman/ups_socomec_capacity | 4 ++--
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/checkman/ups_capacity b/checkman/ups_capacity
index 3fc31f6..eb9c5ce 100644
--- a/checkman/ups_capacity
+++ b/checkman/ups_capacity
@@ -11,36 +11,32 @@ description:
the battery capacity (in percent),
and the remaining runtime (in minutes).
Warning and critical levels can
- be given for the time on battery and the capacity.
+ be given for the remaining run time for the capacity.
perfdata:
The remaining runtime in minutes and the capacity in percent
inventory:
- Supported.
+ One service per UPS will be created.
examples:
ups_capacity_default_levels = {
- 'battime': (0, 0),
+ 'battime': (20, 40),
'capacity': (90, 80)
}
- checkgroup_parameters.setdefault('ups_capacity', [])
-
- checkgroup_parameters['ups_capacity'] = [
- ( {'capacity': ( 90, 80 ) }, ["prod"], ALL_HOSTS, ["ups_capacity"]' ),
- ] + checkgroup_parameters['ups_capacity']
[configuration]
ups_capacity_default_levels(dict): This variable is preset to {{ 'battime': (0, 0), 'capacity': (95, 90) }}
[parameters]
-parameters(dict): with the keys "battime" and "capacity"
+parameters(dict): A dictionary with with the keys {battime} and {capacity}?
- 'battime' is a tuple containing warning and critical levels for the
- time in seconds the USV is on battery. Default levels are (0, 0)
+ {battime} is a tuple containing warning and critical levels for the
+ time in minutes that the USV is estimated to have remaining runtime.
+ Default levels are {(0, 0)}.
- 'capacity' is a tuple containing the warning and critical levels for
- the battery capacity in percent. Default levels are (95, 90)
+ {capacity} is a tuple containing the warning and critical levels for
+ the battery capacity in percent. Default levels are {(95, 90)}
diff --git a/checkman/ups_socomec_capacity b/checkman/ups_socomec_capacity
index 69b4b2d..5b6c477 100644
--- a/checkman/ups_socomec_capacity
+++ b/checkman/ups_socomec_capacity
@@ -9,9 +9,9 @@ description:
the battery capacity (in percent),
and the remaining runtime (in minutes).
Warning and critical levels can
- be given for the time on battery and the capacity.
+ be given for the remaining runtime.
- Please refer to the manpage of ups_capacity for configuration examples.
+ Please refer to the manpage of {ups_capacity} for configuration examples.
perfdata:
The remaining runtime in minutes and the capacity in percent