Module: check_mk
Branch: master
Commit: be8d3376d2eb36ba593e2fe48a3ebebf80bebbb4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=be8d3376d2eb36…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Mar 31 09:53:07 2017 +0200
4577 FIX websphere_mq_channels: Fixed missing channel states
Change-Id: I64c887e5c8605373d5a98faa9b1a8f6885ab25a8
---
.werks/4577 | 11 ++++++
web/plugins/wato/check_parameters.py | 67 +++++++++++++++++++++---------------
2 files changed, 51 insertions(+), 27 deletions(-)
diff --git a/.werks/4577 b/.werks/4577
new file mode 100644
index 0000000..cd8ef88
--- /dev/null
+++ b/.werks/4577
@@ -0,0 +1,11 @@
+Title: websphere_mq_channels: Fixed missing channel states
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1490946082
+
+
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 01eb252..85597ea 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -1697,25 +1697,6 @@ websphere_mq_common_elements = [
default_value = (1000, 1200)
)
),
- ("status",
- Dictionary(
- title = _('Override check state based on channel state (only for
channels)'),
- elements = [
- ("STOPPED", MonitoringState(
- title = _("State when channel is stopped"),
- default_value = 1)),
- ("RETRYING", MonitoringState(
- title = _("State when channel is retrying"),
- default_value = 2)),
- ("RUNNING", MonitoringState(
- title = _("State when channel is running"),
- default_value = 0)),
- ("other", MonitoringState(
- title = _("State when channel status is unknown"),
- default_value = 2)),
- ],
- optional_keys = []
- )),
]
def transform_websphere_mq_queues(source):
@@ -1738,7 +1719,7 @@ register_check_parameters(
_("Websphere MQ"),
Transform(
Dictionary(
- elements = [
+ elements = websphere_mq_common_elements + [
("message_count_perc",
OptionalDropdownChoice(
title = _('Percentage of queue length'),
@@ -1754,9 +1735,7 @@ register_check_parameters(
]
),
default_value = (80.0, 90.0)
- )
- ), ] + \
- websphere_mq_common_elements + [
+ )),
("messages_not_processed",
Dictionary(
title = _("Settings for messages not processed"),
@@ -1781,9 +1760,8 @@ register_check_parameters(
default_value = 1)
),
]
- ),
- ),
- ],
+ )),
+ ],
),
forth = transform_websphere_mq_queues
),
@@ -1796,7 +1774,42 @@ register_check_parameters(
"websphere_mq_channels",
_("Websphere MQ Channels"),
Dictionary(
- elements = websphere_mq_common_elements
+ elements = websphere_mq_common_elements + [
+ ("status",
+ Dictionary(
+ title = _('Override check state based on channel state'),
+ elements = [
+ ("INACTIVE", MonitoringState(
+ title = _("State when channel is inactive"),
+ default_value = 2)),
+ ("INITIALIZING", MonitoringState(
+ title = _("State when channel is initializing"),
+ default_value = 2)),
+ ("BINDING", MonitoringState(
+ title = _("State when channel is binding"),
+ default_value = 2)),
+ ("STARTING", MonitoringState(
+ title = _("State when channel is starting"),
+ default_value = 2)),
+ ("RUNNING", MonitoringState(
+ title = _("State when channel is running"),
+ default_value = 0)),
+ ("RETRYING", MonitoringState(
+ title = _("State when channel is retrying"),
+ default_value = 2)),
+ ("STOPPING", MonitoringState(
+ title = _("State when channel is stopping"),
+ default_value = 2)),
+ ("STOPPED", MonitoringState(
+ title = _("State when channel is stopped"),
+ default_value = 1)),
+ ("other", MonitoringState(
+ title = _("State when channel status is
unknown"),
+ default_value = 2)),
+ ],
+ optional_keys = []
+ )),
+ ],
),
TextAscii(title = _("Name of channel")),
match_type = "dict",