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
July 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
213 discussions
Start a n
N
ew thread
refactoring to fix pylint messages
by Sebastian Herbord
Module: check_mk Branch: master Commit: 886de40d9b9e45163967bb7dde056d1bf459383b URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=886de40d9b9e45…
Author: Sebastian Herbord <sh(a)mathias-kettner.de> Date: Fri Jul 15 16:28:48 2016 +0200 refactoring to fix pylint messages --- modules/check_mk_base.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py index 32beba8..f671fb0 100644 --- a/modules/check_mk_base.py +++ b/modules/check_mk_base.py @@ -1540,10 +1540,9 @@ def do_all_checks_on_host(hostname, ipaddress, only_check_types = None, fetch_ag else: agent_version = None - error_sections = list(error_sections) - error_sections.sort() + error_section_list = sorted(list(error_sections)) - return agent_version, num_success, error_sections, ", ".join(problems) + return agent_version, num_success, error_section_list, ", ".join(problems) # Create a crash dump with a backtrace and the agent output.
8 years, 2 months
1
0
0
0
3155 implemented dual monitoring for systems with management boards ( like HP iLO)
by Sebastian Herbord
Module: check_mk Branch: master Commit: f6d30e191e38d645ab36acc0eaf6f65945ab85ee URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f6d30e191e38d6…
Author: Sebastian Herbord <sh(a)mathias-kettner.de> Date: Fri Jul 15 16:07:26 2016 +0200 3155 implemented dual monitoring for systems with management boards (like HP iLO) --- .werks/3155 | 9 +++ ChangeLog | 1 + modules/check_mk.py | 99 ++++++++++++++++++++------------ modules/check_mk_base.py | 38 +++++++++--- modules/discovery.py | 98 +++++++++++++++++++++++-------- web/plugins/wato/builtin_attributes.py | 50 ++++++++++++++++ 6 files changed, 224 insertions(+), 71 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=f6d30e191e…
8 years, 2 months
1
0
0
0
Fetched Livestatus from upstream.
by Sven Panne
Module: check_mk Branch: master Commit: f355792f360bb393cf1a4573963973d3497aed2e URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f355792f360bb3…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Fri Jul 15 15:14:22 2016 +0200 Fetched Livestatus from upstream. --- livestatus/src/Renderer.cc | 197 ++++++++++++++++++++++---------------------- livestatus/src/Renderer.h | 2 + 2 files changed, 102 insertions(+), 97 deletions(-) diff --git a/livestatus/src/Renderer.cc b/livestatus/src/Renderer.cc index f5d207c..5b71063 100644 --- a/livestatus/src/Renderer.cc +++ b/livestatus/src/Renderer.cc @@ -226,119 +226,122 @@ void Renderer::outputBlob(const vector<char> *blob) { } } -// len = -1 -> use strlen(), len >= 0: consider output as blob, do not handle -// UTF-8. -void Renderer::outputString(const char *value, int len) { - // TODO(sp) Move stuff here... - switch (_format) { - case OutputFormat::csv: - break; - case OutputFormat::json: - break; - case OutputFormat::python: - break; - } - if (value == nullptr) { - if (_format != OutputFormat::csv) { - add("\"\""); - } - return; - } - - if (_format == OutputFormat::csv) { - add(value); - - } else // JSON or PYTHON - { - if (_format == OutputFormat::python && len < 0) { - add("u"); // mark strings as unicode - } - add("\""); - const char *r = value; - int chars_left = len >= 0 ? len : strlen(r); - while (chars_left != 0) { - // Always escape control characters (1..31) - if (*r < 32 && *r >= 0) { - if (len < 0) { - outputUnicodeEscape(static_cast<unsigned>(*r)); - } else { - outputAsciiEscape(*r); - } +void Renderer::outputChars(const char *value, int len) { + add("\""); + const char *r = value; + int chars_left = len >= 0 ? len : strlen(r); + while (chars_left != 0) { + // Always escape control characters (1..31) + if (*r < 32 && *r >= 0) { + if (len < 0) { + outputUnicodeEscape(static_cast<unsigned>(*r)); + } else { + outputAsciiEscape(*r); } + } - // Output ASCII characters unencoded - else if (*r >= 32 || len >= 0) { - if (*r == '"' || *r == '\\') { - add("\\"); - } - add(string(r, 1)); + // Output ASCII characters unencoded + else if (*r >= 32 || len >= 0) { + if (*r == '"' || *r == '\\') { + add("\\"); } + add(string(r, 1)); + } - // interprete two-Byte UTF-8 sequences in mode 'utf8' and 'mixed' - else if ((g_data_encoding == ENCODING_UTF8 || - g_data_encoding == ENCODING_MIXED) && - ((*r & 0xE0) == 0xC0)) { - outputUnicodeEscape(((*r & 31) << 6) | - (*(r + 1) & 0x3F)); // 2 byte encoding - r++; - chars_left--; - } + // interprete two-Byte UTF-8 sequences in mode 'utf8' and 'mixed' + else if ((g_data_encoding == ENCODING_UTF8 || + g_data_encoding == ENCODING_MIXED) && + ((*r & 0xE0) == 0xC0)) { + outputUnicodeEscape(((*r & 31) << 6) | + (*(r + 1) & 0x3F)); // 2 byte encoding + r++; + chars_left--; + } - // interprete 3/4-Byte UTF-8 sequences only in mode 'utf8' - else if (g_data_encoding == ENCODING_UTF8) { - // three-byte sequences (avoid buffer overflow!) - if ((*r & 0xF0) == 0xE0) { - if (chars_left < 3) { - if (g_debug_level >= 2) { - Informational() - << "Ignoring invalid UTF-8 sequence in string '" - << string(value) << "'"; - } - break; // end of string. No use in continuing - } else { - outputUnicodeEscape(((*r & 0x0F) << 12 | - (*(r + 1) & 0x3F) << 6 | - (*(r + 2) & 0x3F))); - r += 2; - chars_left -= 2; - } - } - // four-byte sequences - else if ((*r & 0xF8) == 0xF0) { - if (chars_left < 4) { - if (g_debug_level >= 2) { - Informational() - << "Ignoring invalid UTF-8 sequence in string '" - << string(value) << "'"; - } - break; // end of string. No use in continuing - } else { - outputUnicodeEscape( - ((*r & 0x07) << 18 | (*(r + 1) & 0x3F) << 6 | - (*(r + 2) & 0x3F) << 6 | (*(r + 3) & 0x3F))); - r += 3; - chars_left -= 3; + // interprete 3/4-Byte UTF-8 sequences only in mode 'utf8' + else if (g_data_encoding == ENCODING_UTF8) { + // three-byte sequences (avoid buffer overflow!) + if ((*r & 0xF0) == 0xE0) { + if (chars_left < 3) { + if (g_debug_level >= 2) { + Informational() + << "Ignoring invalid UTF-8 sequence in string '" + << string(value) << "'"; } + break; // end of string. No use in continuing } else { + outputUnicodeEscape(((*r & 0x0F) << 12 | + (*(r + 1) & 0x3F) << 6 | + (*(r + 2) & 0x3F))); + r += 2; + chars_left -= 2; + } + } + // four-byte sequences + else if ((*r & 0xF8) == 0xF0) { + if (chars_left < 4) { if (g_debug_level >= 2) { Informational() << "Ignoring invalid UTF-8 sequence in string '" << string(value) << "'"; } + break; // end of string. No use in continuing + } else { + outputUnicodeEscape( + ((*r & 0x07) << 18 | (*(r + 1) & 0x3F) << 6 | + (*(r + 2) & 0x3F) << 6 | (*(r + 3) & 0x3F))); + r += 3; + chars_left -= 3; + } + } else { + if (g_debug_level >= 2) { + Informational() + << "Ignoring invalid UTF-8 sequence in string '" + << string(value) << "'"; } } + } - // in latin1 and mixed mode interprete all other non-ASCII - // characters as latin1 - else { - outputUnicodeEscape(static_cast<unsigned>( - static_cast<int>(*r) + 256)); // assume latin1 encoding - } - - r++; - chars_left--; + // in latin1 and mixed mode interprete all other non-ASCII + // characters as latin1 + else { + outputUnicodeEscape(static_cast<unsigned>( + static_cast<int>(*r) + 256)); // assume latin1 encoding } - add("\""); + + r++; + chars_left--; + } + add("\""); +} + +// len = -1 -> use strlen(), len >= 0: consider output as blob, do not handle +// UTF-8. +void Renderer::outputString(const char *value, int len) { + switch (_format) { + case OutputFormat::csv: + if (value == nullptr) { + return; + } + add(value); + break; + case OutputFormat::json: + if (value == nullptr) { + add("\"\""); + return; + } + outputChars(value, len); + break; + case OutputFormat::python: + if (value == nullptr) { + add("\"\""); + return; + } + if (len < 0) { + add("u"); // mark strings as unicode + } + outputChars(value, len); + break; } } diff --git a/livestatus/src/Renderer.h b/livestatus/src/Renderer.h index 669a1dc..d2e907e 100644 --- a/livestatus/src/Renderer.h +++ b/livestatus/src/Renderer.h @@ -86,6 +86,8 @@ private: const std::string _list_separator; const std::string _host_service_separator; const int _timezone_offset; + + void outputChars(const char *value, int len); }; #endif // Renderer_h
8 years, 2 months
1
0
0
0
Fetched Livestatus from upstream.
by Sven Panne
Module: check_mk Branch: master Commit: 1a2dcc9678154db99c5e13ba415bc371f4f6154c URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1a2dcc9678154d…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Fri Jul 15 14:54:43 2016 +0200 Fetched Livestatus from upstream. --- livestatus/src/Renderer.cc | 239 +++++++++++++++++++++++++++++++++----------- 1 file changed, 181 insertions(+), 58 deletions(-) diff --git a/livestatus/src/Renderer.cc b/livestatus/src/Renderer.cc index 07c7af9..f5d207c 100644 --- a/livestatus/src/Renderer.cc +++ b/livestatus/src/Renderer.cc @@ -73,42 +73,82 @@ void Renderer::add(const string &str) { _output->add(str); } void Renderer::add(const vector<char> &blob) { _output->add(blob); } void Renderer::startOfQuery() { - if (_format != OutputFormat::csv) { - add("["); + switch (_format) { + case OutputFormat::csv: + break; + case OutputFormat::json: + add("["); + break; + case OutputFormat::python: + add("["); + break; } } void Renderer::outputDataSetSeparator() { - if (_format != OutputFormat::csv) { - add(",\n"); + switch (_format) { + case OutputFormat::csv: + break; + case OutputFormat::json: + add(",\n"); + break; + case OutputFormat::python: + add(",\n"); + break; } } void Renderer::endOfQuery() { - if (_format != OutputFormat::csv) { - add("]\n"); + switch (_format) { + case OutputFormat::csv: + break; + case OutputFormat::json: + add("]\n"); + break; + case OutputFormat::python: + add("]\n"); + break; } } void Renderer::outputDatasetBegin() { - if (_format != OutputFormat::csv) { - add("["); + switch (_format) { + case OutputFormat::csv: + break; + case OutputFormat::json: + add("["); + break; + case OutputFormat::python: + add("["); + break; } } void Renderer::outputDatasetEnd() { - if (_format == OutputFormat::csv) { - add(_dataset_separator); - } else { - add("]"); + switch (_format) { + case OutputFormat::csv: + add(_dataset_separator); + break; + case OutputFormat::json: + add("]"); + break; + case OutputFormat::python: + add("]"); + break; } } void Renderer::outputFieldSeparator() { - if (_format == OutputFormat::csv) { - add(_field_separator); - } else { - add(","); + switch (_format) { + case OutputFormat::csv: + add(_field_separator); + break; + case OutputFormat::json: + add(","); + break; + case OutputFormat::python: + add(","); + break; } } @@ -137,12 +177,16 @@ void Renderer::outputDouble(double value) { } void Renderer::outputNull() { - if (_format == OutputFormat::csv) { - // output empty cell - } else if (_format == OutputFormat::python) { - add("None"); - } else { - add("null"); // JSON + switch (_format) { + case OutputFormat::csv: + // output empty cell + break; + case OutputFormat::json: + add("null"); + break; + case OutputFormat::python: + add("None"); + break; } } @@ -159,22 +203,41 @@ void Renderer::outputUnicodeEscape(unsigned value) { } void Renderer::outputBlob(const vector<char> *blob) { - if (_format != OutputFormat::csv) { - if (blob != nullptr) { - outputString(&(*blob)[0], blob->size()); - } else { - outputNull(); - } - } else { - if (blob != nullptr) { - add(*blob); - } + switch (_format) { + case OutputFormat::csv: + if (blob != nullptr) { + add(*blob); + } + break; + case OutputFormat::json: + if (blob != nullptr) { + outputString(&(*blob)[0], blob->size()); + } else { + outputNull(); + } + break; + case OutputFormat::python: + if (blob != nullptr) { + outputString(&(*blob)[0], blob->size()); + } else { + outputNull(); + } + break; } } -// len = -1 -> use strlen(), len >= 0: consider -// output as blob, do not handle UTF-8. +// len = -1 -> use strlen(), len >= 0: consider output as blob, do not handle +// UTF-8. void Renderer::outputString(const char *value, int len) { + // TODO(sp) Move stuff here... + switch (_format) { + case OutputFormat::csv: + break; + case OutputFormat::json: + break; + case OutputFormat::python: + break; + } if (value == nullptr) { if (_format != OutputFormat::csv) { add("\"\""); @@ -280,63 +343,123 @@ void Renderer::outputString(const char *value, int len) { } void Renderer::outputBeginList() { - if (_format != OutputFormat::csv) { - add("["); + switch (_format) { + case OutputFormat::csv: + break; + case OutputFormat::json: + add("["); + break; + case OutputFormat::python: + add("["); + break; } } void Renderer::outputListSeparator() { - if (_format == OutputFormat::csv) { - add(_list_separator); - } else { - add(","); + switch (_format) { + case OutputFormat::csv: + add(_list_separator); + break; + case OutputFormat::json: + add(","); + break; + case OutputFormat::python: + add(","); + break; } } void Renderer::outputEndList() { - if (_format != OutputFormat::csv) { - add("]"); + switch (_format) { + case OutputFormat::csv: + break; + case OutputFormat::json: + add("]"); + break; + case OutputFormat::python: + add("]"); + break; } } void Renderer::outputBeginSublist() { - if (_format != OutputFormat::csv) { - add("["); + switch (_format) { + case OutputFormat::csv: + break; + case OutputFormat::json: + add("["); + break; + case OutputFormat::python: + add("["); + break; } } void Renderer::outputSublistSeparator() { - if (_format == OutputFormat::csv) { - add(_host_service_separator); - } else { - add(","); + switch (_format) { + case OutputFormat::csv: + add(_host_service_separator); + break; + case OutputFormat::json: + add(","); + break; + case OutputFormat::python: + add(","); + break; } } void Renderer::outputEndSublist() { - if (_format != OutputFormat::csv) { - add("]"); + switch (_format) { + case OutputFormat::csv: + break; + case OutputFormat::json: + add("]"); + break; + case OutputFormat::python: + add("]"); + break; } } void Renderer::outputBeginDict() { - if (_format != OutputFormat::csv) { - add("{"); + switch (_format) { + case OutputFormat::csv: + break; + case OutputFormat::json: + add("{"); + break; + case OutputFormat::python: + add("{"); + break; } } void Renderer::outputDictSeparator() { outputListSeparator(); } void Renderer::outputDictValueSeparator() { - if (_format == OutputFormat::csv) { - add(_host_service_separator); - } else { - add(":"); + switch (_format) { + case OutputFormat::csv: + add(_host_service_separator); + break; + case OutputFormat::json: + add(":"); + break; + case OutputFormat::python: + add(":"); + break; } } void Renderer::outputEndDict() { - if (_format != OutputFormat::csv) { - add("}"); + switch (_format) { + case OutputFormat::csv: + break; + case OutputFormat::json: + add("}"); + break; + case OutputFormat::python: + add("}"); + break; } }
8 years, 2 months
1
0
0
0
fixed help option of special agent ipmi
by Simon Betz
Module: check_mk Branch: master Commit: b548e0ffa07749ab5257ce49cb60bbe4fdbdeee3 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b548e0ffa07749…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Fri Jul 15 14:18:47 2016 +0200 fixed help option of special agent ipmi --- agents/special/agent_ipmi_sensors | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/agents/special/agent_ipmi_sensors b/agents/special/agent_ipmi_sensors index 54025ac..80a1680 100755 --- a/agents/special/agent_ipmi_sensors +++ b/agents/special/agent_ipmi_sensors @@ -65,16 +65,6 @@ except getopt.GetoptError, err: sys.exit(1) -if len(args) == 1: - hostname = args[0] -elif not args: - sys.stderr.write("ERROR: No host given.\n") - sys.exit(1) -else: - sys.stderr.write("ERROR: Please specify exactly one host.\n") - sys.exit(1) - - for o, a in opts: if o in [ '--help' ]: usage() @@ -89,6 +79,16 @@ for o, a in opts: privilege_lvl = a +if len(args) == 1: + hostname = args[0] +elif not args: + sys.stderr.write("ERROR: No host given.\n") + sys.exit(1) +else: + sys.stderr.write("ERROR: Please specify exactly one host.\n") + sys.exit(1) + + if not (username and password and privilege_lvl): sys.stderr.write("ERROR: Credentials are missing.\n") sys.exit(1)
8 years, 2 months
1
0
0
0
New ValueSpec for inline SSH keys
by Mathias Kettner
Module: check_mk Branch: master Commit: a7cc2016d8824a6c962a78cb505844ff5e69ac8c URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a7cc2016d8824a…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Fri Jul 15 13:49:10 2016 +0200 New ValueSpec for inline SSH keys --- web/htdocs/valuespec.py | 75 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py index 7a2aba8..2b44708 100644 --- a/web/htdocs/valuespec.py +++ b/web/htdocs/valuespec.py @@ -31,7 +31,7 @@ # and rename to better name # - Checkbox -> rename to Boolean -import math, os, time, re, sre_constants, urlparse, forms +import math, os, time, re, sre_constants, urlparse, forms, tempfile from lib import * def type_name(v): @@ -3696,7 +3696,6 @@ class TimeofdayRanges(Transform): ) - class Color(ValueSpec): def __init__(self, **kwargs): kwargs["regex"] = "#[0-9]{3,6}" @@ -3751,3 +3750,75 @@ class Color(ValueSpec): def validate_value(self, value, varprefix): if not self._allow_empty and not value: raise MKUserError(varprefix, _("You need to select a color.")) + + +class SSHKeyPair(ValueSpec): + def __init__(self, **kwargs): + ValueSpec.__init__(self, **kwargs) + + + def render_input(self, varprefix, value): + if value: + html.write(_("Fingerprint: %s") % self.value_to_text(value)) + html.hidden_field(varprefix, self._encode_key_for_url(value)) + else: + html.write(_("Key pair will be generated when you save.")) + + + def value_to_text(self, value): + return self._get_key_fingerprint(value) + + + def from_html_vars(self, varprefix): + if html.has_var(varprefix): + return self._decode_key_from_url(html.var(varprefix)) + else: + return self._generate_ssh_key(varprefix) + + @staticmethod + def _encode_key_for_url(value): + return "|".join(value) + + + @staticmethod + def _decode_key_from_url(text): + return text.split("|") + + + @classmethod + def _generate_ssh_key(clazz, varprefix): + tmp_file_name_base = clazz._tmp_file_name() + private_key_file = tmp_file_name_base + ".key" + public_key_file = private_key_file + ".pub" + f = os.popen("echo | ssh-keygen -t rsa -b 4096 -f %s 2>&1" % + quote_shell_string(private_key_file)) + output = f.read() + status = f.close() + os.remove(tmp_file_name_base) + if status: + os.remove(private_key_file) + os.remove(public_key_file) + raise MKUserError(varprefix, _("Failed to create SSH key pair: %s" % output)) + private_key = file(private_key_file).read() + public_key = file(public_key_file).read() + os.remove(private_key_file) + os.remove(public_key_file) + return (private_key, public_key) + + + @classmethod + def _get_key_fingerprint(clazz, value): + private_key, public_key = value + tmp_file_name = clazz._tmp_file_name() + file(tmp_file_name + ".pub", "w").write(public_key) + line = os.popen("ssh-keygen -lf %s" % quote_shell_string(tmp_file_name)).read() + os.remove(tmp_file_name) + # 4096 ff:ac:2b:b0:2a:12:84:f5:94:ae:7a:36:9e:73:a4:0f heute@Klappfisch (RSA) + return line.split()[1] + + + @staticmethod + def _tmp_file_name(): + fd, path = tempfile.mkstemp(dir=defaults.tmp_dir) + os.close(fd) + return path
8 years, 2 months
1
0
0
0
Fetched Livestatus from upstream.
by Sven Panne
Module: check_mk Branch: master Commit: 73c673e502709cd90a57857c9a4302d654daa99f URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=73c673e502709c…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Fri Jul 15 13:05:29 2016 +0200 Fetched Livestatus from upstream. --- livestatus/src/Aggregator.h | 2 +- livestatus/src/AndingFilter.cc | 12 +++----- livestatus/src/AndingFilter.h | 14 ++++++--- livestatus/src/AttributelistColumn.cc | 5 ++- livestatus/src/AttributelistColumn.h | 3 +- livestatus/src/AttributelistFilter.cc | 9 +++--- livestatus/src/AttributelistFilter.h | 13 +++++--- livestatus/src/Column.cc | 2 +- livestatus/src/Column.h | 4 +-- livestatus/src/ColumnFilter.h | 1 - livestatus/src/CountAggregator.cc | 5 +-- livestatus/src/CountAggregator.h | 2 +- livestatus/src/CustomVarsColumn.cc | 4 +-- livestatus/src/CustomVarsColumn.h | 3 +- livestatus/src/CustomVarsFilter.cc | 14 +++------ livestatus/src/CustomVarsFilter.h | 13 +++++--- livestatus/src/DoubleAggregator.cc | 2 +- livestatus/src/DoubleAggregator.h | 2 +- livestatus/src/DoubleColumn.cc | 4 +-- livestatus/src/DoubleColumn.h | 3 +- livestatus/src/DoubleFilter.cc | 13 +++----- livestatus/src/DoubleFilter.h | 11 +++++-- livestatus/src/Filter.cc | 8 ++--- livestatus/src/Filter.h | 22 ++++++++------ livestatus/src/HostlistColumn.cc | 4 +-- livestatus/src/HostlistColumn.h | 3 +- livestatus/src/HostlistFilter.cc | 14 ++++----- livestatus/src/HostlistFilter.h | 13 +++++--- livestatus/src/IntAggregator.cc | 2 +- livestatus/src/IntAggregator.h | 2 +- livestatus/src/IntColumn.cc | 5 ++- livestatus/src/IntColumn.h | 3 +- livestatus/src/IntFilter.cc | 35 +++++++++++---------- livestatus/src/IntFilter.h | 24 +++++++++------ livestatus/src/ListColumn.cc | 4 +-- livestatus/src/ListColumn.h | 3 +- livestatus/src/ListFilter.cc | 11 +++---- livestatus/src/ListFilter.h | 11 +++++-- livestatus/src/NegatingFilter.h | 7 +++-- livestatus/src/OffsetStringMacroColumn.cc | 5 ++- livestatus/src/OffsetStringMacroColumn.h | 3 +- livestatus/src/OffsetTimeColumn.cc | 4 +-- livestatus/src/OffsetTimeColumn.h | 3 +- livestatus/src/OringFilter.cc | 12 +++----- livestatus/src/OringFilter.h | 14 ++++++--- livestatus/src/PerfdataAggregator.cc | 2 +- livestatus/src/PerfdataAggregator.h | 2 +- livestatus/src/Query.cc | 24 +++++++-------- livestatus/src/Query.h | 47 +++++++++++++++-------------- livestatus/src/ServicelistColumn.cc | 4 +-- livestatus/src/ServicelistColumn.h | 3 +- livestatus/src/ServicelistFilter.cc | 9 +++--- livestatus/src/ServicelistFilter.h | 13 +++++--- livestatus/src/StringColumn.cc | 4 +-- livestatus/src/StringColumn.h | 3 +- livestatus/src/StringFilter.cc | 14 +++------ livestatus/src/StringFilter.h | 11 +++++-- livestatus/src/TableStateHistory.cc | 2 +- livestatus/src/TimeFilter.cc | 5 +-- livestatus/src/TimeFilter.h | 10 +++--- livestatus/src/TimePointerColumn.cc | 4 +-- livestatus/src/TimePointerColumn.h | 3 +- livestatus/src/VariadicFilter.cc | 18 +++++------ livestatus/src/VariadicFilter.h | 9 ++---- 64 files changed, 273 insertions(+), 267 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=73c673e502…
8 years, 2 months
1
0
0
0
bugfix: output of notification scripts is now only sent to stdout if this is explicitly requested
by Sebastian Herbord
Module: check_mk Branch: master Commit: b84f943902df8fd916815254e70d3be55d760e77 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b84f943902df8f…
Author: Sebastian Herbord <sh(a)mathias-kettner.de> Date: Fri Jul 15 11:56:12 2016 +0200 bugfix:output of notification scripts is now only sent to stdout if this is explicitly requested --- modules/check_mk.py | 6 +++++- modules/notify.py | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/check_mk.py b/modules/check_mk.py index b5cb4b9..3e745fe 100755 --- a/modules/check_mk.py +++ b/modules/check_mk.py @@ -4976,6 +4976,7 @@ load_checks() opt_nowiki = False opt_split_rrds = False opt_delete_rrds = False +opt_log_to_stdout = False # Do option parsing and execute main function - short_options = 'ASHVLCURODMmd:Ic:nhvpXPNBilf' @@ -4990,7 +4991,8 @@ long_options = [ "help", "version", "verbose", "compile", "debug", "interactive" "man", "nowiki", "config-check", "backup=", "restore=", "check-inventory=", "check-discovery=", "discover-marked-hosts", "paths", "checks=", "inventory", "inventory-as-check=", "hw-changes=", "sw-changes=", "sw-missing=", - "inv-fail-status=", "cmc-file=", "browse-man", "list-man", "update-dns-cache", "cap", "real-time-checks" ] + "inv-fail-status=", "cmc-file=", "browse-man", "list-man", "update-dns-cache", "cap", "real-time-checks", + "log-to-stdout"] non_config_options = ['-L', '--list-checks', '-P', '--package', '-M', '--handle-alerts', '--notify', '--real-time-checks', @@ -5078,6 +5080,8 @@ for o,a in opts: opt_inv_sw_missing = int(a) elif o == "--inv-fail-status": opt_inv_fail_status = int(a) + elif o == "--log-to-stdout": + opt_log_to_stdout = True # Perform actions (major modes) try: diff --git a/modules/notify.py b/modules/notify.py index 6003435..4107db0 100644 --- a/modules/notify.py +++ b/modules/notify.py @@ -1191,7 +1191,8 @@ def call_notification_script(plugin, plugin_context): line = p.stdout.readline() if line != '': plugin_log("Output: %s" % line.rstrip().decode('utf-8')) - sys.stdout.write(line) + if opt_log_to_stdout: + sys.stdout.write(line) else: break # the stdout is closed but the return code may not be available just yet - wait for the
8 years, 2 months
1
0
0
0
bugfix on password store from werk 3154
by Sebastian Herbord
Module: check_mk Branch: master Commit: 6fb65e528c7627beab3e62508caaa822bd3e8f6c URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6fb65e528c7627…
Author: Sebastian Herbord <sh(a)mathias-kettner.de> Date: Fri Jul 15 10:40:32 2016 +0200 bugfix on password store from werk 3154 --- bin/pwquery.sh | 15 +++++++++++++++ checks/check_http | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/bin/pwquery.sh b/bin/pwquery.sh new file mode 100755 index 0000000..86d5f36 --- /dev/null +++ b/bin/pwquery.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# this is run from active checks with empty environment, so we somehow need to figure out +# where python, the passwordstore.py and the passwordstore itself reside + +OMD_ROOT=$1 +shift + +export PYTHONPATH=$OMD_ROOT/lib/python:$OMD_ROOT/local/lib/python + +$OMD_ROOT/bin/python $OMD_ROOT/lib/python/cmk/passwordstore.py\ + --get $1 --user $2\ + --keydir $OMD_ROOT/var/check_mk/private_keys\ + --file $OMD_ROOT/var/check_mk/passwords.json + diff --git a/checks/check_http b/checks/check_http index 891c561..0f8a4f8 100644 --- a/checks/check_http +++ b/checks/check_http @@ -97,7 +97,7 @@ def check_http_arguments(params): user, password = settings["auth"] if password.startswith("store:"): group, password = password[6:].split(":", 1) - args += ' -a %s:%s --password-safe %s' %\ + args += ' -a %s:%s --password-store %s' %\ (quote_shell_string(user), quote_shell_string(password), quote_shell_string(group)) else:
8 years, 2 months
1
0
0
0
Fetched Livestatus from upstream.
by Sven Panne
Module: check_mk Branch: master Commit: 80da30a6aa33f57380fa67930fe0a6faea2ced68 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=80da30a6aa33f5…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Thu Jul 14 16:45:12 2016 +0200 Fetched Livestatus from upstream. --- livestatus/src/AttributelistColumn.cc | 17 +++-- livestatus/src/AttributelistColumn.h | 3 +- livestatus/src/BlobColumn.cc | 9 ++- livestatus/src/BlobColumn.h | 10 ++- livestatus/src/Column.h | 7 +- livestatus/src/ContactgroupsColumn.cc | 18 ++--- livestatus/src/ContactgroupsColumn.h | 5 +- livestatus/src/ContactsColumn.cc | 16 ++-- livestatus/src/ContactsColumn.h | 4 +- livestatus/src/CustomVarsColumn.cc | 29 ++++---- livestatus/src/CustomVarsColumn.h | 3 +- livestatus/src/DoubleColumn.cc | 7 +- livestatus/src/DoubleColumn.h | 3 +- livestatus/src/DownCommColumn.cc | 37 ++++----- livestatus/src/DownCommColumn.h | 5 +- livestatus/src/EmptyColumn.cc | 7 +- livestatus/src/EmptyColumn.h | 10 ++- livestatus/src/GlobalCountersColumn.cc | 9 ++- livestatus/src/GlobalCountersColumn.h | 10 ++- livestatus/src/HostgroupsColumn.cc | 15 ++-- livestatus/src/HostgroupsColumn.h | 4 +- livestatus/src/HostlistColumn.cc | 29 ++++---- livestatus/src/HostlistColumn.h | 3 +- livestatus/src/IntColumn.cc | 6 +- livestatus/src/IntColumn.h | 3 +- livestatus/src/LogwatchListColumn.cc | 15 ++-- livestatus/src/LogwatchListColumn.h | 9 ++- livestatus/src/MetricsColumn.cc | 11 +-- livestatus/src/MetricsColumn.h | 8 +- livestatus/src/NullColumn.cc | 7 +- livestatus/src/NullColumn.h | 10 ++- livestatus/src/OffsetStringMacroColumn.cc | 9 ++- livestatus/src/OffsetStringMacroColumn.h | 3 +- livestatus/src/OffsetTimeColumn.cc | 7 +- livestatus/src/OffsetTimeColumn.h | 9 ++- livestatus/src/Query.cc | 116 ++++++----------------------- livestatus/src/Query.h | 34 +-------- livestatus/src/Renderer.h | 2 +- livestatus/src/ServicegroupsColumn.cc | 16 ++-- livestatus/src/ServicegroupsColumn.h | 4 +- livestatus/src/ServicelistColumn.cc | 62 +++++++-------- livestatus/src/ServicelistColumn.h | 3 +- livestatus/src/StringColumn.cc | 11 +-- livestatus/src/StringColumn.h | 3 +- livestatus/src/TableEventConsole.h | 15 ++-- livestatus/src/TimePointerColumn.cc | 7 +- livestatus/src/TimePointerColumn.h | 9 ++- 47 files changed, 310 insertions(+), 329 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=80da30a6aa…
8 years, 2 months
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
22
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
Results per page:
10
25
50
100
200