Module: check_mk
Branch: master
Commit: 594db4e58cd46ae746f7bf052d1e44687a753375
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=594db4e58cd46a…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Wed Mar 21 09:47:47 2018 +0100
5920 FIX Windows: use standard file matching patterns for fileinfo
Until now, Windows agent was using a non-standard way of defining
recursive wildcards. From now on, the supported wildcard patterns '*',
'?' and '**' work in a standardized way. Recursive patterns can be
defined with '**', matching all descendants of the path so far.
Previous patterns with single '*'s on several directory levels will
from now on work as non-recursive patterns conforming to the standard.
---
.werks/5920 | 15 ++
agents/windows/WinApi.cc | 5 +
agents/windows/WinApi.h | 2 +
agents/windows/WinApiAdaptor.h | 2 +
agents/windows/build_version | 2 +-
agents/windows/check_mk.example.ini | 2 +
agents/windows/sections/SectionFileinfo.cc | 344 +++++++++++++++++++++--------
agents/windows/sections/SectionFileinfo.h | 19 +-
agents/windows/test/MockWinApi.h | 3 +
agents/windows/types.cc | 6 +
agents/windows/types.h | 12 +-
11 files changed, 301 insertions(+), 111 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=594db4e58c…
Module: check_mk
Branch: master
Commit: ebe4c0f3033f54b7ffa4309a3ea95f3478bc5c60
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ebe4c0f3033f54…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Feb 22 12:41:54 2018 +0100
5767 f5_bigip_vserver: Status of VServer is configurable
Change-Id: I9306cbb7434258839610f3ad1a52f391009ff8f5
---
.werks/5767 | 10 ++++++++++
checkman/f5_bigip_vserver | 6 ++++++
checks/f5_bigip_vserver | 12 +++++++-----
web/plugins/wato/check_parameters.py | 26 +++++++++++++++++++++++---
4 files changed, 46 insertions(+), 8 deletions(-)
diff --git a/.werks/5767 b/.werks/5767
new file mode 100644
index 0000000..392ea39
--- /dev/null
+++ b/.werks/5767
@@ -0,0 +1,10 @@
+Title: f5_bigip_vserver: Status of VServer is configurable
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i4
+Date: 1519299680
+Class: feature
+
+
diff --git a/checkman/f5_bigip_vserver b/checkman/f5_bigip_vserver
index befc11a..94f201a 100644
--- a/checkman/f5_bigip_vserver
+++ b/checkman/f5_bigip_vserver
@@ -12,6 +12,12 @@ description:
There is one special handling in the check. If the vserver is not available
and all its children pool members are down the check reports {OK}.
+ All states are configurable. Default values are
+ OK (is up and available, the children pool member(s) are down if VServer is not available),
+ WARN (is disabled, availability unknown),
+ CRIT (is currently not available, is not available),
+ UNKNOWN (is unlicensed).
+
inventory:
Any virtual server that is found online will be added during inventory
and checked for it's status. Virtual servers in the various "Warning"
diff --git a/checks/f5_bigip_vserver b/checks/f5_bigip_vserver
index 47eaf42..0f1120c 100644
--- a/checks/f5_bigip_vserver
+++ b/checks/f5_bigip_vserver
@@ -122,8 +122,9 @@ def check_f5_bigip_vserver(item, params, parsed):
4: (1, "availability is unknown"),
5: (3, "is unlicensed")
}
- state, status = map_server_status.get(vserver["status"][0],\
- (3, "Unhandled status (%d)" % vserver["status"][0]))
+ state, state_readable = map_server_status.get(vserver["status"][0],
+ (3, "Unhandled status (%d)" % vserver["status"][0]))
+ state = params.get('state', {}).get(state_readable.replace(' ', '_'), state)
# vserver["enabled"]
# 0 - none
@@ -133,17 +134,16 @@ def check_f5_bigip_vserver(item, params, parsed):
enabled = ["NONE", "enabled", "disabled", "disabled by parent"][vserver["enabled"][0]]
output = "Virtual Server with IP %s is %s, State %s, Detail: %s" % (vserver["ip"][0],\
- enabled, status, vserver["detail"][0])
+ enabled, state_readable, vserver["detail"][0])
# Special handling
if vserver["status"][0] == 3: # not available
# Statement from the network team, it's uncritical when the childrens are down
if vserver["detail"][0].lower() == "The children pool member(s) are down".lower():
- state = 0
+ state = params.get('state', {}).get("children_pool_members_down_if_not_available", 0)
yield state, output
-
# Check configured limits
map_paramvar_to_text = {
"if_in_octets": "Incoming Bytes",
@@ -156,6 +156,8 @@ def check_f5_bigip_vserver(item, params, parsed):
summed_values["if_total_octets"] = summed_values["if_in_octets"] + summed_values["if_out_octets"]
summed_values["if_total_pkts"] = summed_values["if_in_pkts"] + summed_values["if_out_pkts"]
for param_var, levels in params.items():
+ if param_var == "state":
+ continue
if param_var.endswith("_lower") and type(levels) == tuple:
levels = (None, None) + levels
value = summed_values[param_var.rstrip("_lower")]
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index b87bc93..2ef3561 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -496,9 +496,29 @@ register_check_parameters(
default_difference = (5, 8),
default_value = None,
),
- )
- ]
- ),
+ ),
+ ("state", Dictionary(
+ title=_("Map states"),
+ elements=[
+ ("is_disabled",
+ MonitoringState(title=_("Is disabled"), default_value=1)),
+ ("is_up_and_available",
+ MonitoringState(title=_("Is up and available"), default_value=0)),
+ ("is_currently_not_available",
+ MonitoringState(title=_("Is currently not available"), default_value=2)),
+ ("is_not_available",
+ MonitoringState(title=_("Is not available"), default_value=2)),
+ ("availability_is_unknown",
+ MonitoringState(title=_("Availability is unknown"), default_value=1)),
+ ("is_unlicensed",
+ MonitoringState(title=_("Is unlicensed"), default_value=3)),
+ ("children_pool_members_down_if_not_available",
+ # Special handling, see check plugin
+ MonitoringState(title=_("The children pool member(s) are down if VServer is not available"), default_value=0)),
+ ],
+ optional_keys=False,
+ )),
+ ]),
TextAscii(
title = _("VServer name"),
allow_empty = False
Module: check_mk
Branch: master
Commit: 9b569e9a6c784cf3955d64804ccab8d582c6d1ad
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9b569e9a6c784c…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Thu Mar 22 12:06:36 2018 +0100
5912 FIX mk_jolokia: Fixed exception in Bakery rule if an instance is set
A typo prevented the bakery ruleset to work correctly and has been introduced
in werk #5762.
Change-Id: I3e0048115fdec34b4fa97e7717cb860d68dbe077
---
.werks/5912 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/.werks/5912 b/.werks/5912
new file mode 100644
index 0000000..253e547
--- /dev/null
+++ b/.werks/5912
@@ -0,0 +1,11 @@
+Title: mk_jolokia: Fixed exception in Bakery rule if an instance is set
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i4
+Date: 1521716626
+Class: fix
+
+A typo prevented the bakery ruleset to work correctly and has been introduced
+in werk #5762.