Module: check_mk
Branch: master
Commit: df50d601cf168d32f99be628d0848eb2508d640e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=df50d601cf168d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Apr 20 13:47:50 2015 +0200
#2207 FIX Fix exception in rule based notifiations with Nagios core and event type filter
When using Nagios as a core and the list of allowed events contains flapping
or downtime events and the previous hard state cannot correctly be determined
(due to <tt>max_check_attempts</tt> being greater as) then an exception
could have happened. This has been fixed.
---
.werks/2207 | 12 ++++++++++++
ChangeLog | 1 +
modules/notify.py | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/2207 b/.werks/2207
new file mode 100644
index 0000000..b4a518b
--- /dev/null
+++ b/.werks/2207
@@ -0,0 +1,12 @@
+Title: Fix exception in rule based notifiations with Nagios core and event type filter
+Level: 2
+Component: notifications
+Compatible: compat
+Version: 1.2.7i1
+Date: 1429530226
+Class: fix
+
+When using Nagios as a core and the list of allowed events contains flapping
+or downtime events and the previous hard state cannot correctly be determined
+(due to <tt>max_check_attempts</tt> being greater as) then an exception
+could have happened. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index d4b6006..be01533 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -471,6 +471,7 @@
* 2038 FIX: Log complete Email address into monitoring history when notifying explicity addresses
* 2081 FIX: Improved logging of mkeventd in error cases
* 2193 FIX: Remove duplicate performance data from host notifications...
+ * 2207 FIX: Fix exception in rule based notifiations with Nagios core and event type filter...
BI:
* 1784 FIX: Fix exception in BI Boxes when parents are being used
diff --git a/modules/notify.py b/modules/notify.py
index dcfd344..14c7320 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -943,7 +943,7 @@ def rbn_match_event(context, state, last_state, events, allowed_events):
# Now go through the allowed events. Handle '?' has matching all types!
for allowed in allowed_events:
if event == allowed or \
- event[0] == '?' and event[1] == allowed[1]:
+ event[0] == '?' and len(allowed) > 1 and event[1] == allowed[1]:
return
return "Event type '%s' not handled by this rule. Allowed are: %s" % (
Module: check_mk
Branch: master
Commit: 7970f5a7879545b24250b3df10cff2f7d9596553
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7970f5a7879545…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 20 13:01:31 2015 +0200
Revert "icon selector accepts internal icons during value validation"
This reverts commit 35e7e850be7a37c9afcdd8c4e0fbd01f98bdf91b.
---
web/htdocs/valuespec.py | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 96259e1..bb3423c 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -3367,14 +3367,7 @@ class IconSelector(ValueSpec):
if not self._allow_empty and not value:
raise MKUserError(varprefix, _("You need to select an icon."))
- def is_internal_icon():
- if defaults.omd_root:
- base_path = defaults.omd_root+"/share/check_mk/web/htdocs/images"
- else:
- base_path = defaults.web_dir+"/htdocs/images"
- return os.path.exists(base_path+'/icon_'+value+'.png')
-
- if value and value not in self.available_icons() and not is_internal_icon():
+ if value and value not in self.available_icons():
raise MKUserError(varprefix, _("The selected icon image does not exist."))
Module: check_mk
Branch: master
Commit: 05501be84d254dea848e1c29cc0fa8e6c9d07b22
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=05501be84d254d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Apr 20 11:55:40 2015 +0200
#2206 FIX Add missing option "Show timeline of each object directly in table" for reports
For the report element <i>Availability Table</i> the option for selecting an inline
timeline was missing. This has been fixed.
---
.werks/2206 | 11 +++++++++++
ChangeLog | 1 +
web/plugins/views/availability.py | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/2206 b/.werks/2206
new file mode 100644
index 0000000..8240292
--- /dev/null
+++ b/.werks/2206
@@ -0,0 +1,11 @@
+Title: Add missing option "Show timeline of each object directly in table" for reports
+Level: 1
+Component: reporting
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1429523690
+
+For the report element <i>Availability Table</i> the option for selecting an inline
+timeline was missing. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 52efcd8..d4b6006 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -481,6 +481,7 @@
Reporting & Availability:
* 1990 FIX: Fix two exceptions in PDF exports of host group views
* 2189 FIX: Allow changing graph number from 1 to "all" when editing PNP graph in report...
+ * 2206 FIX: Add missing option "Show timeline of each object directly in table" for reports...
Event Console:
* 1845 Keep record of original source IP address of a syslog message or SNMP trap...
diff --git a/web/plugins/views/availability.py b/web/plugins/views/availability.py
index 0bdf1ac..c9de316 100644
--- a/web/plugins/views/availability.py
+++ b/web/plugins/views/availability.py
@@ -498,7 +498,7 @@ avoption_entries = [
# Timeline
( "show_timeline",
"single",
- False,
+ True,
Checkbox(
title = _("Timeline"),
label = _("Show timeline of each object directly in table")),
Module: check_mk
Branch: master
Commit: 35e7e850be7a37c9afcdd8c4e0fbd01f98bdf91b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=35e7e850be7a37…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 20 11:44:45 2015 +0200
icon selector accepts internal icons during value validation
---
web/htdocs/valuespec.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index bb3423c..96259e1 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -3367,7 +3367,14 @@ class IconSelector(ValueSpec):
if not self._allow_empty and not value:
raise MKUserError(varprefix, _("You need to select an icon."))
- if value and value not in self.available_icons():
+ def is_internal_icon():
+ if defaults.omd_root:
+ base_path = defaults.omd_root+"/share/check_mk/web/htdocs/images"
+ else:
+ base_path = defaults.web_dir+"/htdocs/images"
+ return os.path.exists(base_path+'/icon_'+value+'.png')
+
+ if value and value not in self.available_icons() and not is_internal_icon():
raise MKUserError(varprefix, _("The selected icon image does not exist."))
Module: check_mk
Branch: master
Commit: 2ca2c304d17b6ad832e51ae5573f7154f277af68
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2ca2c304d17b6a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Apr 20 11:25:37 2015 +0200
#2205 check_icmp: new option for pinging the host alias or an explicity address
If you use the rule set <i>Check hosts with PING (ICMP Echo Request)</i> for adding
an ICMP check to a host you can now decide to now use the host's IP address as
PING target but also the host's alias or even an explicit IP address or DNS
name.
---
.werks/2205 | 12 ++++++++++++
ChangeLog | 1 +
checks/check_icmp | 9 ++++++++-
web/plugins/wato/active_checks.py | 16 +++++++++++++++-
4 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/.werks/2205 b/.werks/2205
new file mode 100644
index 0000000..96d7d37
--- /dev/null
+++ b/.werks/2205
@@ -0,0 +1,12 @@
+Title: check_icmp: new option for pinging the host alias or an explicity address
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1429521866
+Class: feature
+
+If you use the rule set <i>Check hosts with PING (ICMP Echo Request)</i> for adding
+an ICMP check to a host you can now decide to now use the host's IP address as
+PING target but also the host's alias or even an explicit IP address or DNS
+name.
diff --git a/ChangeLog b/ChangeLog
index 5fe0f87..52efcd8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -163,6 +163,7 @@
* 2201 apt: New check for checking pending APT updates on Debian and Ubuntu...
* 2114 hitachi_hus_dkc, hitachi_hus_dku: new checks to monitor hardware states of Hitachi Unified Storage DKUs and DKCs
* 2115 bluenet_meter: new check to monitor energy and power related parameters of Bachmann Bluenet PDUs
+ * 2205 check_icmp: new option for pinging the host alias or an explicity address...
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checks/check_icmp b/checks/check_icmp
index ee2acd9..4e0207d 100644
--- a/checks/check_icmp
+++ b/checks/check_icmp
@@ -39,7 +39,14 @@ def check_icmp_arguments(params):
loss = value
args.append("-w %.2f,%d%%" % (rta[0], loss[0]))
args.append("-c %.2f,%d%%" % (rta[1], loss[1]))
- args.append("'$HOSTADDRESS$'")
+
+ target = params.get("address", "address")
+ if target == "address":
+ args.append("'$HOSTADDRESS$'")
+ elif target == "alias":
+ args.append("'$HOSTALIAS$'")
+ else: # custom
+ args.append(quote_shell_string(target[1]))
return " ".join(args)
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 70e42a6..098a5bb 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -221,7 +221,21 @@ register_rule(group,
title = _("Service Description"),
allow_empty = False,
default_value = "PING",
- ))
+ )),
+ ( "address",
+ CascadingDropdown(
+ title = _("Alternative address to ping"),
+ help = _("If you omit this setting then the configured IP address of that host "
+ "will be pinged. You can set an alternative address here (e.g. when "
+ "you want to check a secondary IP address of the host in question)."),
+ orientation = "horizontal",
+ choices = [
+ ( "address", _("Ping the normal IP address")),
+ ( "alias", _("Use the alias as DNS name / IP address")),
+ ( "explicit", _("Ping the following explicity address / DNS name"),
+ Hostname()),
+ ]
+ )),
] + check_icmp_params,
),
match = "all",