Module: check_mk
Branch: master
Commit: d510cbf99f06ddc17f8e9a34141ca998fa80f46a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d510cbf99f06dd…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 30 11:53:30 2015 +0100
Updated bug entries #2274
---
.bugs/2274 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.bugs/2274 b/.bugs/2274
index c9af174..73a9641 100644
--- a/.bugs/2274
+++ b/.bugs/2274
@@ -1,9 +1,11 @@
Title: Auxtags and topics
Component: wato
-State: open
+Class: bug
+State: done
Date: 2014-12-09 11:40:54
Targetversion: 1.2.6
-Class: bug
if you add a topic to a Auxtag, the auxtag is missing in the rules after
it only works if a normal tag group has the same topic.
+
+2015-01-30 11:53:28: changed state open -> done
Module: check_mk
Branch: master
Commit: 7abb0a34dc3dadaf7632000beb3ba40ab699ead1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7abb0a34dc3dad…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 30 11:52:58 2015 +0100
#1925 FIX Fix missing auxilliary tags that have their own topic
If you have created an auxiliary host tag with a topic this
is not also used in any of the normal host tags then that tag
would not be displayed in the rule editor. This has been fixed.
---
.werks/1925 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 55 ++++++++++++++++++++++++++++++----------------------
3 files changed, 45 insertions(+), 23 deletions(-)
diff --git a/.werks/1925 b/.werks/1925
new file mode 100644
index 0000000..662139d
--- /dev/null
+++ b/.werks/1925
@@ -0,0 +1,12 @@
+Title: Fix missing auxilliary tags that have their own topic
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1422615110
+
+If you have created an auxiliary host tag with a topic this
+is not also used in any of the normal host tags then that tag
+would not be displayed in the rule editor. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index dc86636..b9efbf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -174,6 +174,7 @@
* 1879 FIX: Not showing "only show permitted hosts/services" option for users not having "see all" permissions...
* 1922 FIX: Fix exception in saving of hosttags if hosttag has at least one auxiliary tag
* 1883 FIX: Fixed lossing service context when cloning a rule
+ * 1925 FIX: Fix missing auxilliary tags that have their own topic...
Notifications:
* 1662 notification plugin spectrum: finalized script. now able to handle host notications
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index ad8d710..ab78876 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -14993,7 +14993,7 @@ def mode_edit_rule(phase, new = False):
html.write('<img class=ruleyesno align=top src="images/rule_%s.png"> ' % img)
html.radiobutton("value", img, value == val, _("Make the outcome of the ruleset <b>%s</b><br>") % posneg)
- # Addiitonal rule options
+ # Additonal rule options
vs_rule_options.render_input("options", rule_options)
forms.end()
@@ -15054,36 +15054,45 @@ def render_condition_editor(tag_specs, varprefix=""):
varprefix, id, not div_is_open and "display: none;" or ""))
- auxtags = dict(group_hosttags_by_topic(config.wato_aux_tags))
+ auxtags = group_hosttags_by_topic(config.wato_aux_tags)
hosttags = group_hosttags_by_topic(config.wato_host_tags)
- make_foldable = len(hosttags) > 1
- for topic, grouped_tags in hosttags:
+ all_topics = set([])
+ for topic, taggroups in auxtags + hosttags:
+ all_topics.add(topic)
+ all_topics = list(all_topics)
+ all_topics.sort()
+ make_foldable = len(all_topics) > 1
+ for topic in all_topics:
if make_foldable:
html.begin_foldable_container("topic", topic, True, "<b>%s</b>" % (_u(topic)))
html.write("<table class=\"hosttags\">")
# Show main tags
- for entry in grouped_tags:
- id, title, choices = entry[:3]
- html.write("<tr><td class=title>%s: </td>" % _u(title))
- default_tag, deflt = current_tag_setting(choices)
- tag_condition_dropdown("tag", deflt, id)
- if len(choices) == 1:
- html.write(" " + _("set"))
- else:
- html.select(varprefix + "tagvalue_" + id,
- [(t[0], _u(t[1])) for t in choices if t[0] != None], deflt=default_tag)
- html.write("</div>")
- html.write("</td></tr>")
+ for t, grouped_tags in hosttags:
+ if t == topic:
+ for entry in grouped_tags:
+ id, title, choices = entry[:3]
+ html.write("<tr><td class=title>%s: </td>" % _u(title))
+ default_tag, deflt = current_tag_setting(choices)
+ tag_condition_dropdown("tag", deflt, id)
+ if len(choices) == 1:
+ html.write(" " + _("set"))
+ else:
+ html.select(varprefix + "tagvalue_" + id,
+ [(t[0], _u(t[1])) for t in choices if t[0] != None], deflt=default_tag)
+ html.write("</div>")
+ html.write("</td></tr>")
# And auxiliary tags
- for id, title in sorted(auxtags.get(topic, []), key = lambda x: x[0]):
- html.write("<tr><td class=title>%s: </td>" % _u(title))
- default_tag, deflt = current_tag_setting([(id, _u(title))])
- tag_condition_dropdown("auxtag", deflt, id)
- html.write(" " + _("set"))
- html.write("</div>")
- html.write("</td></tr>")
+ for t, grouped_tags in auxtags:
+ if t == topic:
+ for id, title in grouped_tags:
+ html.write("<tr><td class=title>%s: </td>" % _u(title))
+ default_tag, deflt = current_tag_setting([(id, _u(title))])
+ tag_condition_dropdown("auxtag", deflt, id)
+ html.write(" " + _("set"))
+ html.write("</div>")
+ html.write("</td></tr>")
html.write("</table>")
if make_foldable:
Module: check_mk
Branch: master
Commit: cbede5eadbaee864cb962fa6139e1d5d3c3f4697
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cbede5eadbaee8…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 30 11:35:06 2015 +0100
Updated bug entries #2269
---
.bugs/2269 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.bugs/2269 b/.bugs/2269
index ab05ea4..6d83a55 100644
--- a/.bugs/2269
+++ b/.bugs/2269
@@ -1,12 +1,14 @@
Title: cmk -v for a new host only creates the first RRD
Component: core
-State: open
+Class: bug
+State: done
Date: 2015-01-19 18:15:29
Targetversion: 1.2.6
-Class: bug
When you do a cmk -v on the command line (using CMC) for a new host
without any RRD then only the first RRD is being created. Also the Perf-O-Meter
runs into a problem. Looks like only the first perfdata value is being
processed. Could be some spacing problem when sending check results from
the cmk command took via pipe into the core
+
+2015-01-30 11:34:48: changed state open -> done
Module: check_mk
Branch: master
Commit: 80dd51fe7c9a5ba9b3431fe2e71be234bd5b0b39
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=80dd51fe7c9a5b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 30 11:25:01 2015 +0100
Updated bug entries #2274, #2266, #2283, #2269, #2270
---
.bugs/2266 | 4 ++--
.bugs/2269 | 2 +-
.bugs/2270 | 2 +-
.bugs/2274 | 2 +-
.bugs/2283 | 6 +++---
.bugs/config | 9 +++++----
6 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/.bugs/2266 b/.bugs/2266
index 655d015..0130a3f 100644
--- a/.bugs/2266
+++ b/.bugs/2266
@@ -2,8 +2,8 @@ Title: LDAP-Logfile create exception if directory does not exist
Component: wato
State: open
Date: 2014-12-23 09:28:57
-Targetversion: 1.2.5i1
-Class: bug
+Targetversion: 1.2.7
+Class: cleanup
Anyway we should move the log messages of the LDAP connecttor
to some central place. It needn't be a separate Logfile. We should
diff --git a/.bugs/2269 b/.bugs/2269
index 0db9843..ab05ea4 100644
--- a/.bugs/2269
+++ b/.bugs/2269
@@ -2,7 +2,7 @@ Title: cmk -v for a new host only creates the first RRD
Component: core
State: open
Date: 2015-01-19 18:15:29
-Targetversion: 1.2.5i1
+Targetversion: 1.2.6
Class: bug
When you do a cmk -v on the command line (using CMC) for a new host
diff --git a/.bugs/2270 b/.bugs/2270
index 6d7cade..e0c5f5f 100644
--- a/.bugs/2270
+++ b/.bugs/2270
@@ -2,7 +2,7 @@ Title: Fix many WATO rules where above needs to be replaced with at
Component: checks
State: open
Date: 2015-01-22 14:45:46
-Targetversion: 1.2.5i1
+Targetversion: 1.2.6
Class: bug
There is a commit (0470292ef?) that needs to be reverted.
diff --git a/.bugs/2274 b/.bugs/2274
index 0dd8a6e..c9af174 100644
--- a/.bugs/2274
+++ b/.bugs/2274
@@ -2,7 +2,7 @@ Title: Auxtags and topics
Component: wato
State: open
Date: 2014-12-09 11:40:54
-Targetversion: 1.2.5i1
+Targetversion: 1.2.6
Class: bug
if you add a topic to a Auxtag, the auxtag is missing in the rules after
diff --git a/.bugs/2283 b/.bugs/2283
index 2b9ad0d..735590e 100644
--- a/.bugs/2283
+++ b/.bugs/2283
@@ -2,9 +2,9 @@ Title: logwatch: log entries with braces in names can not be shown in logwatch G
Component: multisite
State: open
Date: 2014-12-12 17:21:28
-Targetversion: 1.2.5i1
+Targetversion: 1.2.7
Class: bug
-Braces are not removed from logwatch stored files. Logwatch-GUI does not handle this difference correctly.
-e.g. mk_sap creates such logwatch files
+Braces are not removed from logwatch stored files. Logwatch-GUI does not
+handle this difference correctly. e.g. mk_sap creates such logwatch files
diff --git a/.bugs/config b/.bugs/config
index 05d7372..d155ffb 100644
--- a/.bugs/config
+++ b/.bugs/config
@@ -7,7 +7,7 @@ states = {
"discuss" : tty_red,
}
-components = [
+components = [
( "core", "Core Modules, Setup, etc." ),
( "checks", "Checks and Agent plugins" ),
( "multisite", "Multisite GUI" ),
@@ -17,11 +17,11 @@ components = [
( "livecheck", "Livecheck part in Livestatus, livecheck helper" ),
( "wato", "Check_MK's Web Administration Tool" ),
( "bi", "BI - Business Intelligence" ),
- ( "mobile", "Multisite Mobile GUI" ),
+ ( "mobile", "Multisite Mobile GUI" ),
( "docu", "Documentation "),
]
-classes = [
+classes = [
"cleanup",
"nastiness",
"bug",
@@ -31,6 +31,7 @@ classes = [
]
targetversions = [
- "1.2.5i1",
+ "1.2.6",
+ "1.2.7",
"future",
]
Module: check_mk
Branch: master
Commit: 5d6af13b2e33123d2e0710a11ba1506c10ac3227
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5d6af13b2e3312…
Author: Lutz Helwing <lh(a)mathias-kettner.de>
Date: Fri Jan 30 11:20:52 2015 +0100
added werk 1958
---
.werks/1958 | 10 ++++++++++
ChangeLog | 1 +
2 files changed, 11 insertions(+)
diff --git a/.werks/1958 b/.werks/1958
new file mode 100644
index 0000000..bd0167f
--- /dev/null
+++ b/.werks/1958
@@ -0,0 +1,10 @@
+Title: akcp_daisy_smoke: added new check for smoke sensors on expansion boards which are daisy chained to an AKCP securityProbe 5E
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1422610163
+Class: feature
+
+This check is used to monitor the sensor state of smoke sensors which are plugged into an expansion board that is part of a daisy chain connected to an AKCP sensorProbe 5E.
+
diff --git a/ChangeLog b/ChangeLog
index 7872af5..de34a4c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -65,6 +65,7 @@
* 1929 netapp_api_if: improved inventory and check output of virtual interfaces...
* 1218 Inital Agent Version for zOS (IBM Mainframes)...
* 1948 Livedump: Host names can now be prefixed with an individual string...
+ * 1958 akcp_daisy_smoke: added new check for smoke sensors on expansion boards which are daisy chained to an AKCP securityProbe 5E...
* 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...
Module: check_mk
Branch: master
Commit: 0cbe62c5cf4f9a1e97c55a9499adf70e0bf548b1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0cbe62c5cf4f9a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 30 11:08:17 2015 +0100
#1924 FIX cisco_power: Fixed missing power supplies in case where name is not unique
---
.bugs/2212 | 8 +++++---
.werks/1923 | 10 ++++++++++
.werks/1924 | 10 ++++++++++
ChangeLog | 2 ++
checks/cisco_power | 53 ++++++++++++++++++++++++++++++++++++++++------------
checks/cisco_qos | 5 +++--
6 files changed, 71 insertions(+), 17 deletions(-)
diff --git a/.bugs/2212 b/.bugs/2212
index b3095f2..fd4fbe5 100644
--- a/.bugs/2212
+++ b/.bugs/2212
@@ -1,10 +1,12 @@
Title: cisco_power: Check mixes up different sensors (non unique item)
Component: checks
-State: open
+Class: bug
+State: done
Date: 2014-12-11 10:40:05
Targetversion: 1.2.5i1
-Class: bug
-The walk switch-cisco-c4500-x-1chassis contains 4 power supply sensors, while two are named
+The walk switch-cisco-c4500-6 contains 4 power supply sensors, while two are named
Power Supply 1 and two Power Supply 2. The check does not handled them correctly and mixes
the data.
+
+2015-01-30 11:07:29: changed state open -> done
diff --git a/.werks/1923 b/.werks/1923
new file mode 100644
index 0000000..a464336
--- /dev/null
+++ b/.werks/1923
@@ -0,0 +1,10 @@
+Title: cisco_qos: Fixed exception in discovery that might lead to missing services
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1422612381
+
+
diff --git a/.werks/1924 b/.werks/1924
new file mode 100644
index 0000000..28def32
--- /dev/null
+++ b/.werks/1924
@@ -0,0 +1,10 @@
+Title: cisco_power: Fixed missing power supplies in case where name is not unique
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1422612479
+
+
diff --git a/ChangeLog b/ChangeLog
index ecf7b09..44bf32c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -121,6 +121,8 @@
* 1921 FIX: kemp_loadmaster_realserver: reimplementation, now use vendor specific information
* 1859 FIX: cups_queues: linux agent now runs section cups_queues in cached mode...
* 1881 FIX: omd_status: Check works now event when a site is reported as not OK...
+ * 1923 FIX: cisco_qos: Fixed exception in discovery that might lead to missing services
+ * 1924 FIX: cisco_power: Fixed missing power supplies in case where name is not unique
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/cisco_power b/checks/cisco_power
index d3ad1fd..8d67efc 100644
--- a/checks/cisco_power
+++ b/checks/cisco_power
@@ -31,23 +31,52 @@
# .1.3.6.1.4.1.9.9.13.1.5.1.4.1 1
# .1.3.6.1.4.1.9.9.13.1.5.1.4.2 2
-cisco_power_states = ('', 'normal', 'warning', 'critical',
- 'shutdown', 'notPresent', 'notFunctioning')
-cisco_power_source = ( '', 'unknown', 'ac', 'dc', 'externalPowerSupply', 'internalRedundant')
+cisco_power_states = (
+ '',
+ 'normal',
+ 'warning',
+ 'critical',
+ 'shutdown',
+ 'not present',
+ 'not functioning',
+)
+
+cisco_power_sources = (
+ '',
+ 'unknown',
+ 'AC',
+ 'DC',
+ 'external power supply',
+ 'internal redundant',
+)
def inventory_cisco_power(info):
- for line in info:
- # 5 in line[1] means cisco_power_states = notPresent
- if 'RPS NotExist' not in line[1] and line[2] != '5':
- yield cisco_sensor_item(line[1], line[0]), None
+ # Note: the name of the power supply is not unique. We have seen
+ # a Cisco with four entries in the MIB. So we force uniqueness
+ # by appending a "/4" for ID 4 if the name is not unique
+ discovered = {}
+ for sid, textinfo, state, source in info:
+ if 'RPS NotExist' not in textinfo and state != '5':
+ name = cisco_sensor_item(textinfo, sid)
+ discovered.setdefault(name, []).append(sid)
+
+ for name, entries in discovered.items():
+ if len(entries) == 1:
+ yield name, None
+ else:
+ for entry in entries:
+ yield ("%s/%s" % (name, entry)), None
+
def check_cisco_power(item, no_params, info):
+ if "/" in item:
+ item = item.split("/")[1]
for sid, textinfo, state, source in info:
- state = int(state)
- source = int(source)
- if cisco_sensor_item(textinfo, sid) == item:
- output = '%s, State: %s, Source: %s' % \
- (textinfo, cisco_power_states[state], cisco_power_source[source])
+ if sid == item or cisco_sensor_item(textinfo, sid) == item:
+ state = int(state)
+ source = int(source)
+ output = 'state: %s, source: %s' % \
+ (cisco_power_states[state], cisco_power_sources[source])
if state == 1:
return 0, "%s" % output
elif state == 2:
diff --git a/checks/cisco_qos b/checks/cisco_qos
index 6b515c5..19f0d18 100644
--- a/checks/cisco_qos
+++ b/checks/cisco_qos
@@ -136,8 +136,9 @@ def inventory_cisco_qos(info):
for class_id, class_name in info[2]:
# Get interface ids which use this qos class
for policy_id, objects_id in cisco_qos_get_config_entries_by_class_id(config, class_id):
- if_name = if_names[ifs[policy_id]]
- items += [ ('%s: %s' % (if_name, class_name), {}) ]
+ if ifs[policy_id] in if_names:
+ if_name = if_names[ifs[policy_id]]
+ items += [ ('%s: %s' % (if_name, class_name), {}) ]
return items