lists.checkmk.com
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
List overview
Download
Checkmk git commits
April 2016
----- 2024 -----
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
checkmk-commits@lists.checkmk.com
8 participants
356 discussions
Start a n
N
ew thread
3110 FIX ewon: Various improvements to snmp proxy functionality
by Sebastian Herbord
Module: check_mk Branch: master Commit: 6e680ce53c18bf739f59017e91d3b8b588809366 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6e680ce53c18bf…
Author: Sebastian Herbord <sh(a)mathias-kettner.de> Date: Fri Apr 1 10:43:57 2016 +0200 3110 FIX ewon: Various improvements to snmp proxy functionality Added configurable O2 levels and disabled the crit status when the N2 outlet is open. Also fixed incompatibility with nagios core. Unfortunately these changes make a re-discovery of the device necessary. --- .werks/3110 | 13 +++++++ ChangeLog | 2 ++ checks/ewon | 65 ++++++++++++++++++++-------------- web/plugins/wato/check_parameters.py | 39 +++++++++++++++++++- 4 files changed, 91 insertions(+), 28 deletions(-) diff --git a/.werks/3110 b/.werks/3110 new file mode 100644 index 0000000..9851816 --- /dev/null +++ b/.werks/3110 @@ -0,0 +1,13 @@ +Title: ewon: Various improvements to snmp proxy functionality +Level: 1 +Component: checks +Class: fix +Compatible: incomp +State: unknown +Version: 1.2.9i1 +Date: 1459499897 + +Added configurable O2 levels and disabled the crit status when the N2 outlet is open. +Also fixed incompatibility with nagios core. + +Unfortunately these changes make a re-discovery of the device necessary. diff --git a/ChangeLog b/ChangeLog index 6a93ee0..9f0e2f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -115,6 +115,8 @@ * 3309 FIX: zpool_status: fixed wrong error handling... * 3014 FIX: windows_tasks.ps1: fixed incorrect text encoding for tasks with umlauts * 3015 FIX: Dump host (cmk -D): fixed exception with service descriptions containing umlauts + * 3110 FIX: ewon: Various improvements to snmp proxy functionality... + NOTE: Please refer to the migration notes! Multisite: * 3187 notification view: new filter for log command via regex diff --git a/checks/ewon b/checks/ewon index 61d1717..a546e13 100644 --- a/checks/ewon +++ b/checks/ewon @@ -55,7 +55,7 @@ oxyreduct_tag_map = { "incident", "O2 high", "O2 low", "alarms", ]}, - 5: {"flags": "00??????00000101", + 5: {"flags": "00??????0000?101", "flag_names": [ "recovery", "maintenance", "", "", "", "", "", "", @@ -73,7 +73,7 @@ oxyreduct_tag_map = { ]}, 8: {"same_as": 6}, 9: {"same_as": 7}, - 10: {"name": "O2 average", "levels": (16, 17, 14, 13), "scale": 0.01, "unit": "%", + 10: {"name": "O2 average", "levels_name": "o2_levels", "levels": (16, 17, 14, 13), "scale": 0.01, "unit": "%", "perfvar": "o2_percentage"}, 11: {"name": "O2 target", "scale": 0.01, "unit": "%"}, 12: {"name": "O2 for N2-in", "scale": 0.01, "unit": "%"}, @@ -118,7 +118,7 @@ def inventory_oxyreduct(parsed): yield name, {} -def check_oxyreduct(item, param, parsed): +def check_oxyreduct(item, params, parsed): def to_binary(n): return ''.join(str(1 & int(n) >> i) for i in range(16)[::-1]) @@ -151,17 +151,28 @@ def check_oxyreduct(item, param, parsed): if "scale" in tag_params: value = float(value) * tag_params["scale"] - if "levels" in tag_params: + if "levels_name" in tag_params and tag_params["levels_name"] in params: + warn, crit, warn_lower, crit_lower = params[tag_params["levels_name"]] + + elif "levels" in tag_params: warn, crit, warn_lower, crit_lower = tag_params["levels"] + if warn and crit and warn_lower and crit_lower: if (value >= crit) or (value <= crit_lower): status = 2 elif (value >= warn) or (value <= warn_lower): status = 1 + + levels_text = "" + if status != 0: + levels_text = " (warn/crit at %s%s/%s%s and below %s%s/%s%s)" %\ + (warn, unit, crit, unit, warn_lower, unit, crit_lower, unit) + perfdata = [] if "perfvar" in tag_params: - perfdata.append((tag_params["perfvar"], value)) - yield status, "%s%s %s" % (value, unit, tag_params["name"]), perfdata + perfdata.append((tag_params["perfvar"], value, warn, crit)) + yield status, "%s%s %s%s" %\ + (value, unit, tag_params["name"], levels_text), perfdata returned = True # if it's a bitmask, try to determine if they are good flags @@ -200,37 +211,37 @@ def inventory_ewon(parsed): if settings: deviceName = settings[0] - yield "eWON Status", [deviceName] + yield "eWON Status", {"device": deviceName} if deviceName: for res in globals()["inventory_%s" % deviceName](parsed): - yield res + item, params = res + params["device"] = deviceName + yield item, params -def check_ewon(item, param, parsed): +def check_ewon(item, params, parsed): if item == "eWON Status": - if not param: + if params["device"] is None: return 1, "This device requires configuration. Plese pick the device type." else: - return 0, "Configured for %s" % param[0] - - settings = host_extra_conf(g_hostname, ewon_discovery_rules) - - if settings: - return globals()["check_%s" % settings[0]](item, param, parsed) + return 0, "Configured for %s" % params["device"] + if params["device"]: + return globals()["check_%s" % params["device"]](item, params[params["device"]], parsed) check_info["ewon"] = { - "check_function" : check_ewon, - "inventory_function" : inventory_ewon, - "parse_function" : parse_ewon, - "service_description" : "%s", - "has_perfdata" : True, - "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.8284.2.1", - "snmp_info" : (".1.3.6.1.4.1.8284.2.1.3.1.11.1", [2, #tagCfgId - 4, #tagValue - 16, #undocumented name field - ] - ) + "check_function" : check_ewon, + "inventory_function" : inventory_ewon, + "parse_function" : parse_ewon, + "service_description" : "%s", + "has_perfdata" : True, + "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.8284.2.1", + "snmp_info" : (".1.3.6.1.4.1.8284.2.1.3.1.11.1", [2, #tagCfgId + 4, #tagValue + 16, #undocumented name field + ] + ), + "group" : "ewon" } diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py index 09fe92e..12b8b7f 100644 --- a/web/plugins/wato/check_parameters.py +++ b/web/plugins/wato/check_parameters.py @@ -191,7 +191,7 @@ register_rule(group + '/' + subgroup_inventory, register_rule(group + '/' + subgroup_inventory, varname = "ewon_discovery_rules", - title = _("EWON Discovery"), + title = _("eWON Discovery"), help = _("The ewon vpn routers can rely data from a secondary device via snmp. " "It doesn't however allow discovery of the device type relayed this way. " "To allow interpretation of the data you need to pick the device manually."), @@ -204,6 +204,7 @@ register_rule(group + '/' + subgroup_inventory, ], default_value = None, ), + match = 'first' ) @@ -1320,6 +1321,42 @@ register_check_parameters( match_type = "dict" ) + +register_check_parameters( + subgroup_environment, + 'ewon', + _("eWON SNMP Proxy"), + Dictionary( + title = _("Device Type"), + help = _("The eWON router can act as a proxy to metrics from a secondary non-snmp device." + "Here you can make settings to the monitoring of the proxied device."), + elements = [ + ("oxyreduct", Dictionary( + title = _("Wagner OxyReduct"), + elements = [ + ("o2_levels", Tuple( + title = _("O2 levels"), + elements = [ + Percentage(title = _("Warning at"), default_value = 16.0), + Percentage(title = _("Critical at"), default_value = 17.0), + Percentage(title = _("Warning below"), default_value = 14.0), + Percentage(title = _("Critical below"), default_value = 13.0), + ] + ) + ) + ] + ) + ) + ] + ), + TextAscii( + title = _("Item name"), + help = _("The item name. The meaning of this depends on the proxied device: " + "- Wagner OxyReduct: Name of the room/protection zone") + ), + match_type = "dict" +) + #. # .--Storage-------------------------------------------------------------. # | ____ _ |
8 years, 6 months
1
0
0
0
Refactored time filter to be better understandable
by Lars Michelsen
Module: check_mk Branch: master Commit: 76e2fe3f8c92515378b5a224ed67d9a90048b089 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=76e2fe3f8c9251…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Fri Apr 1 08:12:37 2016 +0200 Refactored time filter to be better understandable --- web/plugins/visuals/filters.py | 72 +++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 41 deletions(-) diff --git a/web/plugins/visuals/filters.py b/web/plugins/visuals/filters.py index fad5ba5..0e1325a 100644 --- a/web/plugins/visuals/filters.py +++ b/web/plugins/visuals/filters.py @@ -716,6 +716,7 @@ class FilterTime(Filter): Filter.__init__(self, name, title, info, varnames, [column]) + def double_height(self): return True @@ -750,47 +751,36 @@ class FilterTime(Filter): # Extract timerange user has selected from HTML variables def get_time_range(self): - range = [] - for what in [ "from", "until" ]: - varprefix = self.name + "_" + what - count = html.var(varprefix) - if count == "": - range.append(None) - else: - rangename = html.var(varprefix + "_range") - if rangename == "abs": - try: - range.append(time.mktime(time.strptime(count, "%Y-%m-%d"))) - except: - html.add_user_error(varprefix, _("Please enter the date in the format YYYY-MM-DD.")) - range.append(None) - elif rangename == "unix": - range.append(int(count)) - else: - try: - count = int(count) - secs = count * int(rangename) - range.append(int(time.time()) - secs) - except: - range.append(None) - html.set_var(varprefix, "") - - return range - - # I'm not sure if this function is useful or ever been called. - # Problem is, that it is not clear wether to use "since" or "before" - # here. - # def variable_settings(self, row): - # vars = [] - # secs = int(time.time()) - row[self.column] - # for s, n in self.ranges[::-1]: - # v = secs / s - # secs -= v * s - # vars.append((self.name + "_" + n, secs)) - # return vars - - # def heading_info(self): - # return _("since the last couple of seconds") + return self._get_time_range_of("from"), \ + self._get_time_range_of("until") + + + def _get_time_range_of(self, what): + varprefix = self.name + "_" + what + count = html.var(varprefix) + if count == "": + return None + + rangename = html.var(varprefix + "_range") + if rangename == "abs": + try: + return time.mktime(time.strptime(count, "%Y-%m-%d")) + except: + html.add_user_error(varprefix, _("Please enter the date in the format YYYY-MM-DD.")) + return None + + elif rangename == "unix": + return int(count) + + try: + count = int(count) + secs = count * int(rangename) + return int(time.time()) - secs + except: + html.set_var(varprefix, "") + return None + + declare_filter(250, FilterTime("service", "svc_last_state_change", _("Last service state change"), "service_last_state_change")) declare_filter(251, FilterTime("service", "svc_last_check", _("Last service check"), "service_last_check"))
8 years, 6 months
1
0
0
0
Fixed various missing abstract method definitions
by Lars Michelsen
Module: check_mk Branch: master Commit: b04dce602503b2234b2cf61bdb8b24892c8dac43 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b04dce602503b2…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Thu Mar 31 17:46:17 2016 +0200 Fixed various missing abstract method definitions --- web/htdocs/htmllib.py | 4 ++++ web/htdocs/valuespec.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py index 30512d5..81f6cb7 100644 --- a/web/htdocs/htmllib.py +++ b/web/htdocs/htmllib.py @@ -1741,6 +1741,10 @@ class html(GUITester): # To be overridden by subclasses # + def set_content_type(self, ty): + raise NotImplementedError() + + def lowlevel_write(self, text): raise NotImplementedError() diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py index 9eb9266..2716dc3 100644 --- a/web/htdocs/valuespec.py +++ b/web/htdocs/valuespec.py @@ -1581,6 +1581,9 @@ class ListChoice(ValueSpec): self._elements = self.get_elements() self._loaded_at = id(html) # unique for each query! + def get_elements(self): + raise NotImplementedError() + def canonical_value(self): return [] @@ -3090,7 +3093,7 @@ class ElementSelection(ValueSpec): self._loaded_at = id(html) # unique for each query! def get_elements(self): - raise Exception("You need to implement a get_elements() method.") + raise NotImplementedError() def canonical_value(self): self.load_elements()
8 years, 6 months
1
0
0
0
3355 FIX Fixed possible borken HW-/SW-Inventory history view
by Lars Michelsen
Module: check_mk Branch: master Commit: 019e32d590cefb8d4cf2313e9b8f127bc3082d1f URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=019e32d590cefb…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Fri Apr 1 08:18:21 2016 +0200 3355 FIX Fixed possible borken HW-/SW-Inventory history view --- .werks/3355 | 10 ++++++++++ ChangeLog | 1 + web/plugins/views/inventory.py | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.werks/3355 b/.werks/3355 new file mode 100644 index 0000000..d71b0dc --- /dev/null +++ b/.werks/3355 @@ -0,0 +1,10 @@ +Title: Fixed possible borken HW-/SW-Inventory history view +Level: 1 +Component: multisite +Class: fix +Compatible: compat +State: unknown +Version: 1.2.9i1 +Date: 1459491473 + + diff --git a/ChangeLog b/ChangeLog index ecdcba4..6a93ee0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -149,6 +149,7 @@ * 3344 FIX: Removed host inventory painters and sorters from non host based views * 3345 FIX: Fixed exception when inventory painter was used as group painter * 3347 FIX: Improved performance when having a lot of users... + * 3355 FIX: Fixed possible borken HW-/SW-Inventory history view WATO: * 3244 WATO BI Module: swap order of aggregation function and child node selection... diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py index b012d9d..6590f0d 100644 --- a/web/plugins/views/inventory.py +++ b/web/plugins/views/inventory.py @@ -1184,7 +1184,7 @@ multisite_datasources["invhist"] = { "table" : inv_history_table, "infos" : [ "host", "invhist" ], "keys" : [], - "idkeys" : [ "host_name", "invhist_date" ], + "idkeys" : [ "host_name", "invhist_time" ], } multisite_painters["invhist_time"] = {
8 years, 6 months
1
0
0
0
FilterInvtableAge: Fixed broken function call
by Lars Michelsen
Module: check_mk Branch: master Commit: 7304fa78ff0635b19acde14cf368218711be723e URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7304fa78ff0635…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Fri Apr 1 08:23:03 2016 +0200 FilterInvtableAge: Fixed broken function call --- web/plugins/visuals/inventory.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/plugins/visuals/inventory.py b/web/plugins/visuals/inventory.py index 5d73945..3b79d02 100644 --- a/web/plugins/visuals/inventory.py +++ b/web/plugins/visuals/inventory.py @@ -80,11 +80,14 @@ class FilterInvtableAge(Filter): Age(display=["days"]).render_input(self.name + "_to", 0) html.write("</tr></table>") + def double_height(self): return True + def filter_table(self, rows): - return self.filter_table_with_conversion(self, rows, lambda age: age) + return self.filter_table_with_conversion(rows, lambda age: age) + def filter_table_with_conversion(self, rows, conv): from_value = Age().from_html_vars(self.name + "_from")
8 years, 6 months
1
0
0
0
Fixed access to not existing variable
by Lars Michelsen
Module: check_mk Branch: master Commit: 486a757da2eb4a472891baf4ef397bc047cd507a URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=486a757da2eb4a…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Thu Mar 31 17:42:22 2016 +0200 Fixed access to not existing variable --- web/htdocs/mkeventd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/htdocs/mkeventd.py b/web/htdocs/mkeventd.py index 557ec6c..2a3c3bd 100644 --- a/web/htdocs/mkeventd.py +++ b/web/htdocs/mkeventd.py @@ -302,7 +302,7 @@ def check_timeperiod(tpname): return _("The timeperiod %s is currently not active" % tpname) except Exception, e: return _("Cannot update timeperiod information for %s: %s" % (tpname, e)) - if opt_debug: + if config.debug: raise def match(pattern, text, complete = True):
8 years, 6 months
1
0
0
0
← Newer
1
...
33
34
35
36
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Results per page:
10
25
50
100
200