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
October 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
10 participants
276 discussions
Start a n
N
ew thread
3901 Logfile pattern analyser: pattern lists can now be searched
by Lars Michelsen
Module: check_mk Branch: master Commit: 0bbf689b05389509d5cc8860145d3c27ebcd9e67 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0bbf689b053895…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Oct 12 15:34:19 2016 +0200 3901 Logfile pattern analyser: pattern lists can now be searched --- .werks/3901 | 9 +++++++++ ChangeLog | 1 + web/htdocs/htmllib.py | 2 +- web/htdocs/wato.py | 42 ++++++++++++++++-------------------------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.werks/3901 b/.werks/3901 new file mode 100644 index 0000000..a8a9526 --- /dev/null +++ b/.werks/3901 @@ -0,0 +1,9 @@ +Title: Logfile pattern analyser: pattern lists can now be searched +Level: 1 +Component: wato +Compatible: compat +Version: 1.4.0i2 +Date: 1476279236 +Class: feature + + diff --git a/ChangeLog b/ChangeLog index be557b3..60a3fb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,7 @@ WATO: * 3915 User access times: New icon when never logged in; New column "last seen" + * 3901 Logfile pattern analyser: pattern lists can now be searched * 3914 FIX: Roles: Aliases are now unique during cloning * 3820 FIX: Network scan: no longer fails completely if hostname already exists in configuration... diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py index 6781253..a1924a5 100644 --- a/web/htdocs/htmllib.py +++ b/web/htdocs/htmllib.py @@ -233,7 +233,7 @@ class HTMLGenerator(OutputFunnel): # these tags can be called by their tag names, e.g. 'self.title(content)' _shortcut_tags = set(['title', 'h1', 'h2', 'h3', 'th', 'tr', 'td', 'center',\ - 'div', 'p', 'span', 'canvas', 'strong', 'sub']) + 'div', 'p', 'span', 'canvas', 'strong', 'sub', 'tt']) # these tags can be called by open_name(), close_name() and render_name(), e.g. 'self.open_html()' _tag_names = set(['html', 'head', 'body', 'header', 'footer', 'a', 'b',\ diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index 588a611..5ad73ab 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -14631,13 +14631,7 @@ def mode_pattern_editor(phase): html.begin_foldable_container("rule", str(rulenr), True, HTML("<b>Rule #%d</b>" % (rulenr + 1)), indent = False) - html.write('<table style="width:100%" class="data logwatch"><tr>') - html.write('<th style="width:30px;">' + _('Match') + '</th>') - html.write('<th style="width:50px;">' + _('State') + '</th>') - html.write('<th style="width:300px;">' + _('Pattern') + '</th>') - html.write('<th>' + _('Comment') + '</th>') - html.write('<th style="width:300px;">' + _('Matched line') + '</th>') - html.write('</tr>\n') + table.begin("pattern_editor_rule_%d" % rulenr, sortable=False) # Each rule can hold no, one or several patterns. Loop them all here odd = "odd" @@ -14651,9 +14645,9 @@ def mode_pattern_editor(phase): # Prepare highlighted search txt match_start = matched.start() match_end = matched.end() - disp_match_txt = match_txt[:match_start] \ - + '<span class=match>' + match_txt[match_start:match_end] + '</span>' \ - + match_txt[match_end:] + disp_match_txt = html.attrencode(match_txt[:match_start]) \ + + '<span class=match>' + html.attrencode(match_txt[match_start:match_end]) + '</span>' \ + + html.attrencode(match_txt[match_end:]) if already_matched == False: # First match @@ -14671,23 +14665,20 @@ def mode_pattern_editor(phase): match_img = 'nmatch' match_title = _('This logfile pattern does not match the given string.') - html.write('<tr class="data %s0 %s">' % (odd, reason_class)) - html.write('<td><img align=absmiddle title="%s" ' \ - 'class=icon src="images/icon_rule%s.png" />' % \ - (match_title, match_img)) + table.row(css=reason_class) + table.cell(_('Match')) + html.icon(match_title, "rule%s" % match_img) cls = '' if match_class == 'match first': - cls = ' class="svcstate state%d"' % logwatch.level_state(state) - html.write('<td style="text-align:center" %s>%s</td>' % (cls, logwatch.level_name(state))) - html.write('<td><code>%s</code></td>' % pattern) - html.write('<td>%s</td>' % comment) - html.write('<td>%s</td>' % disp_match_txt) - html.write('</tr>\n') - - odd = odd == "odd" and "even" or "odd" - - html.write('<tr class="data %s0"><td colspan=5>' % odd) + cls = 'svcstate state%d' % logwatch.level_state(state) + table.cell(_('State'), logwatch.level_name(state), css=cls) + table.cell(_('Pattern'), html.render_tt(html.attrencode(pattern))) + table.cell(_('Comment'), html.attrencode(comment)) + table.cell(_('Matched line'), disp_match_txt) + + table.row(fixed=True) + table.cell(colspan=5) edit_url = folder_preserving_link([ ("mode", "edit_rule"), ("varname", varname), @@ -14696,9 +14687,8 @@ def mode_pattern_editor(phase): ("item", mk_repr(item)), ("rule_folder", folder.path())]) html.icon_button(edit_url, _("Edit this rule"), "edit") - html.write('</td></tr>\n') - html.write('</table>\n') + table.end() html.end_foldable_container()
7 years, 11 months
1
0
0
0
Fixed visibility of fixed rows on filtering table
by Lars Michelsen
Module: check_mk Branch: master Commit: 88e886a459141cabb4039bcb52e08f6213c0bbff URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=88e886a459141c…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Oct 12 15:32:04 2016 +0200 Fixed visibility of fixed rows on filtering table --- web/htdocs/table.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/htdocs/table.py b/web/htdocs/table.py index 6c3b461..03645ec 100644 --- a/web/htdocs/table.py +++ b/web/htdocs/table.py @@ -194,9 +194,11 @@ def end(): filtered_rows = [] for row, css, state, fixed in rows: if state == "header" or fixed: + filtered_rows.append((row, css, state, fixed)) continue # skip filtering of headers or fixed rows + for cell_content, css_classes, colspan in row: - if fixed or search_term in cell_content.lower(): + if search_term in cell_content.lower(): filtered_rows.append((row, css, state, fixed)) break # skip other cells when matched rows = filtered_rows
7 years, 11 months
1
0
0
0
Fixed logwatch pattern analyzer since werk 3817
by Lars Michelsen
Module: check_mk Branch: master Commit: 173ce32c8bace866b1d6341589dc97c74dfffbb4 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=173ce32c8bace8…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Oct 12 15:07:01 2016 +0200 Fixed logwatch pattern analyzer since werk 3817 --- web/htdocs/wato.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index 6ccd1fb..588a611 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -14599,6 +14599,9 @@ def mode_pattern_editor(phase): last_in_group = rulenr == len(ruleset) - 1 or ruleset[rulenr+1][0] != folder pattern_list, tag_specs, host_list, item_list, rule_options = parse_rule(rulespec, rule) + if type(pattern_list) == dict: + pattern_list = pattern_list["reclassify_patterns"] + # Check if this rule applies to the given host/service if hostname: # If hostname (and maybe filename) try match it
7 years, 11 months
1
0
0
0
Small bugfix to htmllib API: a and label function definition
by Roland Halbig
Module: check_mk Branch: master Commit: f3639e12a7970ea4896ad305c58add8e8ce39474 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f3639e12a7970e…
Author: Roland Halbig <rh(a)mathias-kettner.de> Date: Wed Oct 12 15:15:27 2016 +0200 Small bugfix to htmllib API: a and label function definition --- web/htdocs/htmllib.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py index 54e303b..6781253 100644 --- a/web/htdocs/htmllib.py +++ b/web/htdocs/htmllib.py @@ -431,7 +431,7 @@ class HTMLGenerator(OutputFunnel): self.write(self._render_opening_tag('a', **attrs)) - def a(self, href, content, **attrs): + def a(self, content, href, **attrs): attrs['href'] = href self.write(self._render_content_tag('a', content, **attrs)) @@ -480,7 +480,7 @@ class HTMLGenerator(OutputFunnel): # - def label(self, for_, content, **attrs): + def label(self, content, for_, **attrs): attrs['for'] = for_ self.write(self._render_content_tag('label', content, **attrs)) @@ -695,7 +695,7 @@ class HTMLCheck_MK(HTMLGenerator): self.open_table(class_="header") self.open_tr() self.open_td(width="*", class_="heading") - self.a(href="#", content = title, onfocus="if (this.blur) this.blur();", + self.a(title, href="#", onfocus="if (this.blur) this.blur();", onclick="this.innerHTML=\'%s\'; document.location.reload();" % _("Reloading...")) self.close_td() @@ -780,9 +780,10 @@ class HTMLCheck_MK(HTMLGenerator): self.write(self.render_icon_button(*args, **kwargs)) -class DeprecationWrapper(HTMLCheck_MK): +#. +class DeprecationWrapper(HTMLCheck_MK): # Only strip off some tags. We allow some simple tags like # <b>, <tt>, <i> to be part of the string. This is useful # for messages where we still want to have formating options.
7 years, 11 months
1
0
0
0
updated werk 3913
by Simon Betz
Module: check_mk Branch: master Commit: 42fc9cda7b202b2622dab35aab232dac7c2e2b11 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=42fc9cda7b202b…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Wed Oct 12 14:30:17 2016 +0200 updated werk 3913 --- .werks/3913 | 2 +- ChangeLog | 2 +- checkman/gude_powerbanks | 17 +++++++++ checkman/gude_relayport | 5 ++- checks/gude_powerbanks | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ checks/gude_relayport | 55 ++++++++++++----------------- 6 files changed, 133 insertions(+), 38 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=42fc9cda7b…
7 years, 11 months
1
0
0
0
htmllib: refactoring & introducing new API
by Roland Halbig
Module: check_mk Branch: master Commit: 990cc3fd669a97d762841b85a9548a32a77264f7 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=990cc3fd669a97…
Author: Roland Halbig <rh(a)mathias-kettner.de> Date: Wed Oct 12 14:23:12 2016 +0200 htmllib: refactoring & introducing new API --- web/htdocs/htmllib.py | 1111 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 770 insertions(+), 341 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=990cc3fd66…
7 years, 11 months
1
0
0
0
added missing implementation in related check function
by Simon Betz
Module: check_mk Branch: master Commit: 135bac8caa2ff2c3c0bf5c5de3bf689592eaad61 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=135bac8caa2ff2…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Wed Oct 12 11:49:33 2016 +0200 added missing implementation in related check function --- checks/fileinfo | 62 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/checks/fileinfo b/checks/fileinfo index dc37936..3ae61ee 100644 --- a/checks/fileinfo +++ b/checks/fileinfo @@ -81,18 +81,31 @@ def fileinfo_groups_of_file(check_filename, reftime): pattern = ( pattern, '' ) inclusion, exclusion = pattern + + inclusion_is_regex = False + exclusion_is_regex = False if inclusion.startswith("~"): - reg = regex(inclusion[1:]) + inclusion_is_regex = True + inclusion = inclusion[1:] + if exclusion.startswith("~"): + exclusion_is_regex = True + exclusion = exclusion[1:] + + inclusion_tmp = fileinfo_process_date(inclusion, reftime) + if inclusion != inclusion_tmp: + inclusion = inclusion_tmp + + if inclusion_is_regex: + reg = regex(inclusion) incl_match = reg.match( check_filename ) else: - inclusion = fileinfo_process_date(inclusion, reftime) - incl_match = fnmatch.fnmatch(check_filename, inclusion) + incl_match = fnmatch.fnmatch( check_filename, inclusion ) - if exclusion.startswith("~"): - reg = regex(exclusion[1:]) + if exclusion_is_regex: + reg = regex(exclusion) excl_match = reg.match( check_filename ) else: - excl_match = fnmatch.fnmatch(check_filename, exclusion) + excl_match = fnmatch.fnmatch( check_filename, exclusion ) if incl_match and not excl_match: groups.append(group_name) @@ -185,16 +198,41 @@ def check_fileinfo_groups(item, params, info): continue for pattern in params['precompiled_patterns']: + # endswith("No such file...") is needed to + # support the solaris perl based version of fileinfo + if line[0].endswith("No such file or directory"): + continue + inclusion, exclusion = pattern - inclusion_tmp = fileinfo_process_date(inclusion,reftime) + + inclusion_is_regex = False + exclusion_is_regex = False + if inclusion.startswith("~"): + inclusion_is_regex = True + inclusion = inclusion[1:] + if exclusion.startswith("~"): + exclusion_is_regex = True + exclusion = exclusion[1:] + + inclusion_tmp = fileinfo_process_date(inclusion, reftime) if inclusion != inclusion_tmp: inclusion = inclusion_tmp date_inclusion = inclusion_tmp - # endswith("No such file...") is needed to - # support the solaris perl based version of fileinfo - if not line[0].endswith("No such file or directory") \ - and fnmatch.fnmatch(line[0], inclusion) and str(line[1]) not in ['missing',''] \ - and not fnmatch.fnmatch(line[0], exclusion): + + if inclusion_is_regex: + reg = regex(inclusion) + incl_match = reg.match( line[0] ) + else: + incl_match = fnmatch.fnmatch( line[0], inclusion ) + + if exclusion_is_regex: + reg = regex(exclusion) + excl_match = reg.match( line[0] ) + else: + excl_match = fnmatch.fnmatch( line[0], exclusion ) + + if str(line[1]) not in [ 'missing', '' ] and \ + incl_match and not excl_match: size = int(line[1]) size_all += size if size_smallest == None:
7 years, 11 months
1
0
0
0
no current timestamp in inventory anymore
by Marcel Arentz
Module: check_mk Branch: master Commit: 63ce9f987096bbc254ed232c236aa955d306a931 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=63ce9f987096bb…
Author: Marcel Arentz <ma(a)mathias-kettner.de> Date: Wed Oct 12 11:42:53 2016 +0200 no current timestamp in inventory anymore --- inventory/snmp_uptime | 4 +--- inventory/uptime | 4 +--- web/plugins/views/inventory.py | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/inventory/snmp_uptime b/inventory/snmp_uptime index 59ef36c..1289149 100644 --- a/inventory/snmp_uptime +++ b/inventory/snmp_uptime @@ -26,11 +26,9 @@ def inv_snmp_uptime(info): uptime = parse_snmp_uptime(info[0][0]) - current = time.time() - since = time.strftime("%c", time.localtime(current - float(uptime))) + since = time.strftime("%c", time.localtime(time.time() - float(uptime))) node = inv_tree("software.os.") node["since"] = since - node["last"] = time.strftime("%c", time.localtime(current)) inv_info['snmp_uptime'] = { diff --git a/inventory/uptime b/inventory/uptime index 8419180..112c4c9 100644 --- a/inventory/uptime +++ b/inventory/uptime @@ -30,11 +30,9 @@ def inv_uptime(info): uptime = float(info[0][0]) - current = time.time() - since = time.strftime("%c", time.localtime(current - float(info[0][0])) ) + since = time.strftime("%c", time.localtime(time.time() - float(info[0][0])) ) node = inv_tree("software.os.") node["since"] = since - node["last"] = time.strftime("%c", time.localtime(current)) inv_info['uptime'] = { "inv_function" : inv_uptime, diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py index ed31b23..8c4dbdc 100644 --- a/web/plugins/views/inventory.py +++ b/web/plugins/views/inventory.py @@ -681,7 +681,6 @@ inventory_displayhints.update({ ".software.os.service_packs:" : { "title" : _("Service Packs"), "render" : render_inv_dicttable, "keyorder" : [ "name" ] }, ".software.os.since" : { "title" : _("Up since"), }, - ".software.os.last" : { "title" : _("Last response"), }, ".software.configuration." : { "title" : _("Configuration"), }, ".software.configuration.snmp_info." : { "title" : _("SNMP Information"), }, ".software.configuration.snmp_info.contact" : { "title" : _("Contact"), },
7 years, 11 months
1
0
0
0
pylint seems not fail detecting pymssql.connect() method. disable the check
by Lars Michelsen
Module: check_mk Branch: master Commit: 391e3158f0ebd7b6e31ea72258705041a65481df URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=391e3158f0ebd7…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Oct 12 11:18:32 2016 +0200 pylint seems not fail detecting pymssql.connect() method. disable the check --- doc/treasures/active_checks/check_sql | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/treasures/active_checks/check_sql b/doc/treasures/active_checks/check_sql index ead9edd..f93a14f 100755 --- a/doc/treasures/active_checks/check_sql +++ b/doc/treasures/active_checks/check_sql @@ -170,6 +170,7 @@ try: db = pymssql if opt_port == None: opt_port=1433 + # pylint: disable=no-member db_connection = db.connect(host=opt_hostname+":"+str(opt_port), \ database=opt_name, user=opt_user, password=opt_password )
7 years, 11 months
1
0
0
0
Added helper function to get full host state names
by Lars Michelsen
Module: check_mk Branch: master Commit: 1ca9bb21b4420833c60a0da72f82d6cff73eb53d URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ca9bb21b44208…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Oct 12 09:38:27 2016 +0200 Added helper function to get full host state names --- lib/defines.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/defines.py b/lib/defines.py index 130d7de..206677a 100644 --- a/lib/defines.py +++ b/lib/defines.py @@ -66,6 +66,15 @@ def short_service_state_name(state_num, deflt=""): return states.get(state_num, deflt) +def host_state_name(state_num, deflt=""): + states = { + 0: _("UP"), + 1: _("DOWN"), + 2: _("UNREACHABLE"), + } + return states.get(state_num, deflt) + + def short_host_state_name(state_num, deflt=""): states = { 0: _("UP"),
7 years, 11 months
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
28
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
Results per page:
10
25
50
100
200