Module: check_mk
Branch: master
Commit: 7be64b4690a3b9996eb37e33d084c1be7df2d844
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7be64b4690a3b9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Nov 18 10:20:53 2014 +0100
Updated bug entries #2204
---
.bugs/2204 | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/.bugs/2204 b/.bugs/2204
new file mode 100644
index 0000000..9047c86
--- /dev/null
+++ b/.bugs/2204
@@ -0,0 +1,14 @@
+Title: Make PNP graphs in notifications user independent
+Component: core
+State: open
+Date: 2014-11-18 10:18:50
+Targetversion: 1.2.5i1
+Class: bug
+
+When using bulk notifications to send mails to a non-contact, the graphs can not
+be fetched from PNP, because there is no user context. This seems to need a patch
+for PNP, because we need to provide a user name which is then checked against
+livestatus for permission on the service or host.
+
+A possible good fix could be to patch pnp that the permission check is disabled
+when executed from command line.
Module: check_mk
Branch: master
Commit: 5a5edb052892bc32b912c58e03c6876aeccfa7ad
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5a5edb052892bc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Nov 17 15:27:27 2014 +0100
Updated bug entries #2225
---
.bugs/2225 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/2225 b/.bugs/2225
new file mode 100644
index 0000000..ce19421
--- /dev/null
+++ b/.bugs/2225
@@ -0,0 +1,10 @@
+Title: Host diagnostics partially broken
+Component: wato
+State: open
+Date: 2014-11-17 15:26:35
+Targetversion: 1.2.5i1
+Class: bug
+
+The host diagnostics in WATO only refreshes two of the five boxes. Always
+the first and by random one of the others. By clicking on the arrows you
+can force updates - however.
Module: check_mk
Branch: master
Commit: 53942579195e0eca5aff72a25e888ac85ee1076a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=53942579195e0e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Nov 17 15:26:15 2014 +0100
#1513 FIX Handle broken SNMP bulk walk implementation of Mikrotik Router firmware RouterOS v6.22
This firmware sometimes responds with duplicate OIDs on a bulk walk. This has
been fixed by ignoring consecutive answers for the same OID.
---
.werks/1513 | 11 +++++++++++
ChangeLog | 1 +
modules/snmp.py | 10 +++++++++-
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/.werks/1513 b/.werks/1513
new file mode 100644
index 0000000..fe089cb
--- /dev/null
+++ b/.werks/1513
@@ -0,0 +1,11 @@
+Title: Handle broken SNMP bulk walk implementation of Mikrotik Router firmware RouterOS v6.22
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1416234308
+Class: fix
+
+This firmware sometimes responds with duplicate OIDs on a bulk walk. This has
+been fixed by ignoring consecutive answers for the same OID.
+
diff --git a/ChangeLog b/ChangeLog
index 2eb70db..a1d651a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,6 +31,7 @@
NOTE: Please refer to the migration notes!
* 1437 FIX: veeam_jobs: fixed incorrect state for BackupSync job...
* 1511 FIX: oracle_jobs: avoid broken checks, make compatible with old version...
+ * 1513 FIX: Handle broken SNMP bulk walk implementation of Mikrotik Router firmware RouterOS v6.22...
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/modules/snmp.py b/modules/snmp.py
index c45ff46..159e2a4 100644
--- a/modules/snmp.py
+++ b/modules/snmp.py
@@ -133,7 +133,6 @@ def get_snmp_table(hostname, ip, check_type, oid_info):
index_format = column
continue
-
if opt_use_snmp_walk or is_usewalk_host(hostname):
rowinfo = get_stored_snmpwalk(hostname, fetchoid)
elif has_inline_snmp and use_inline_snmp:
@@ -141,6 +140,15 @@ def get_snmp_table(hostname, ip, check_type, oid_info):
else:
rowinfo = snmpwalk_on_suboid(hostname, ip, fetchoid)
+ # I've seen a broken device (Mikrotik Router), that broke after an
+ # update to RouterOS v6.22. It would return 9 time the same OID when
+ # .1.3.6.1.2.1.1.1.0 was being walked. We try to detect these situations
+ # by removing any duplicate OID information
+ if len(rowinfo) > 1 and rowinfo[0][0] == rowinfo[1][0]:
+ if opt_verbose:
+ sys.stderr.write("Detected broken SNMP agent. Ignoring duplicate OID %s.\n" % rowinfo[0][0])
+ rowinfo = rowinfo[:1]
+
columns.append((fetchoid, rowinfo))
number_rows = len(rowinfo)
if len(rowinfo) > max_len:
Module: check_mk
Branch: master
Commit: b796073e9a6c5545b38bc28c8d8e21b1b93dfbf1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b796073e9a6c55…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Nov 17 12:23:51 2014 +0100
#1512 Bulk notification can now be grouped according to custom macro values
When you configure notification bulking you can now let the value of
one or several host/service custom macros decide in which bulk a
notification email goes. For example you can select the variable <tt>FOO</tt>
to be used for grouping. Then for each different value of this macro
a separate bulk will be created.
---
.werks/1512 | 13 +++++++++++++
ChangeLog | 1 +
modules/notify.py | 9 ++++++++-
web/htdocs/wato.py | 14 ++++++++++++++
4 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/.werks/1512 b/.werks/1512
new file mode 100644
index 0000000..398292b
--- /dev/null
+++ b/.werks/1512
@@ -0,0 +1,13 @@
+Title: Bulk notification can now be grouped according to custom macro values
+Level: 2
+Component: notifications
+Compatible: compat
+Version: 1.2.5i7
+Date: 1416223329
+Class: feature
+
+When you configure notification bulking you can now let the value of
+one or several host/service custom macros decide in which bulk a
+notification email goes. For example you can select the variable <tt>FOO</tt>
+to be used for grouping. Then for each different value of this macro
+a separate bulk will be created.
diff --git a/ChangeLog b/ChangeLog
index 0fe476a..2eb70db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -63,6 +63,7 @@
* 1498 FIX: Fixed displaying of global settings titles / help texts...
Notifications:
+ * 1512 Bulk notification can now be grouped according to custom macro values...
* 1168 FIX: HTML mails can now be configured to display graphs among each other...
BI:
diff --git a/modules/notify.py b/modules/notify.py
index 3c0d063..f9d6164 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -1443,7 +1443,7 @@ def do_bulk_notify(contact, plugin, params, plugin_context, bulk):
# 2. plugin
# 3. time horizon (interval) in seconds
# 4. max bulked notifications
- # 5. elements specified in bulk["groupby"]
+ # 5. elements specified in bulk["groupby"] and bulk["groupby_custom"]
# We first create a bulk path constructed as a tuple of strings.
# Later we convert that to a unique directory name.
# Note: if you have separate bulk rules with exactly the same
@@ -1468,6 +1468,13 @@ def do_bulk_notify(contact, plugin, params, plugin_context, bulk):
state = plugin_context.get(what + "STATE", "")
bulk_path += ("state", state)
+ # User might have specified _FOO instead of FOO
+ bulkby_custom = bulk.get("groupby_custom", [])
+ for macroname in bulkby_custom:
+ macroname = macroname.lstrip("_").upper()
+ value = plugin_context.get(what + "_" + macroname, "")
+ bulk_path += (macroname.lower(), value)
+
notify_log(" --> storing for bulk notification %s" % "|".join(bulk_path))
bulk_dirname = create_bulk_dirname(bulk_path)
uuid = fresh_uuid()
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 5d4ca8e..5b68ffe 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8511,6 +8511,20 @@ def vs_notification_rule(userid = None):
( "groupby",
vs_notification_bulkby(),
),
+ ( "groupby_custom",
+ ListOfStrings(
+ valuespec = ID(),
+ orientation = "horizontal",
+ title = _("Create separate notification bulks for different values of the following custom macros"),
+ help = _("If you enter the names of host/service-custom macros here then for each different "
+ "combination of values of those macros a separate bulk will be created. This can be used "
+ "in combination with the grouping by folder, host etc. Omit any leading underscore. "
+ "<b>Note</b>: If you are using "
+ "Nagios as a core you need to make sure that the values of the required macros are "
+ "present in the notification context. This is done in <tt>check_mk_templates.cfg</tt>. If you "
+ "macro is <tt>_FOO</tt> then you need to add the variables <tt>NOTIFY_HOST_FOO</tt> and "
+ "<tt>NOTIFY_SERVICE_FOO</tt>."),
+ )),
],
columns = 1,
optional_keys = False,
Module: check_mk
Branch: master
Commit: 5f528a7ed38b997b250e4ac80be5e735073e698b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5f528a7ed38b99…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Nov 17 11:36:54 2014 +0100
Updated bug entries #2224
---
.bugs/2224 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/.bugs/2224 b/.bugs/2224
new file mode 100644
index 0000000..e273344
--- /dev/null
+++ b/.bugs/2224
@@ -0,0 +1,11 @@
+Title: Options for Email notification not visible when entering rule
+Component: wato
+State: open
+Date: 2014-11-17 11:35:35
+Targetversion: 1.2.5i1
+Class: bug
+
+When you go to the default rule in the RBN then the method
+is set to HTML Email, but the actual options are not visible.
+When you switch back and forth between Cancel, then they
+become visible. Seems to be a bug in the valuespec.