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 2017
----- 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
288 discussions
Start a n
N
ew thread
Use explicit list of files when packing default agent RPMs
by Lars Michelsen
Module: check_mk Branch: master Commit: b6fde1b7f14a04352c484a9046dd411f1db2acef URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b6fde1b7f14a04…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Oct 4 10:48:24 2017 +0200 Use explicit list of files when packing default agent RPMs Change-Id: I9289561bfbe25d613960f2d07d9d135e8391a82c --- agents/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/agents/Makefile b/agents/Makefile index 85de987..dec3b0d 100644 --- a/agents/Makefile +++ b/agents/Makefile @@ -72,7 +72,14 @@ rpm $(RPM_PACKAGE): mkdir -p $(RPM_TOPDIR)/SOURCES mkdir -p $(RPM_TOPDIR)/BUILD mkdir -p $(RPM_TOPDIR)/SPECS - tar czf $(RPM_TOPDIR)/SOURCES/$(NAME)-$(VERSION).tar.gz --transform='s@^@$(DISTNAME)/@' * + tar czf \ + $(RPM_TOPDIR)/SOURCES/$(NAME)-$(VERSION).tar.gz \ + --transform='s@^@$(DISTNAME)/@' \ + cfg_examples \ + check_mk_agent.linux \ + check_mk_caching_agent.linux \ + waitmax \ + mk-job sed "s/^Version:.*/Version: $(RPM_VERSION)/" $(NAME).spec > $(NAME)-$(VERSION).spec rm -f *.rpm rpmbuild -ba --buildroot "$(RPM_BUILDROOT)" \
6 years, 11 months
1
0
0
0
Minor cleanup ps.include: fixed name inconsistency between rule title and service details
by Simon Betz
Module: check_mk Branch: master Commit: 8057609739d8adcb23c532e5ebd4e36d11ca933b URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8057609739d8ad…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Wed Oct 4 11:05:41 2017 +0200 Minor cleanup ps.include: fixed name inconsistency between rule title and service details Change-Id: Iada57b346dab09b87eeef4fee2989e409577130d --- checks/ps.include | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/checks/ps.include b/checks/ps.include index a8b4bfa..d898d92 100644 --- a/checks/ps.include +++ b/checks/ps.include @@ -490,8 +490,11 @@ def check_ps_common(item, params, parsed, cpu_cores = 1, info_name = "processes" infotext += " (ok from %d to %d)(!)" % (okmin, okmax) if virtual_size: - for size, name in [ (virtual_size, "virtual"), (resident_size, "resident") ]: - infotext += " %.1f MB %s" % ((size / 1024.0), name) + for size, name, title in [ + (virtual_size, "virtual", "virtual"), + (resident_size, "resident", "physical"), + ]: + infotext += " %.1f MB %s" % ((size / 1024.0), title) if "%s_levels" % name in params: warn_level, crit_level = params["%s_levels" % name] if size * 1024 >= crit_level:
6 years, 11 months
1
0
0
0
Use std::chrono facilities for time zone.
by Sven Panne
Module: check_mk Branch: master Commit: d9af35176ed5acc6430481264058c98aa7bb67e8 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d9af35176ed5ac…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Mon Oct 2 15:52:45 2017 +0200 Use std::chrono facilities for time zone. Apart from being much more readable and type safe than int/time_t, it removes a few shortening conversions. Change-Id: I316a8ab1c215584c65a7e1c4d1a5b8fa3bfdf563 --- Makefile | 1 + livestatus/src/Aggregator.h | 2 +- livestatus/src/AndingFilter.cc | 13 +- livestatus/src/AndingFilter.h | 5 +- livestatus/src/CountAggregator.cc | 2 +- livestatus/src/CountAggregator.h | 3 +- livestatus/src/CustomVarsDictFilter.cc | 26 ++-- livestatus/src/CustomVarsDictFilter.h | 3 +- livestatus/src/CustomVarsListFilter.cc | 16 +-- livestatus/src/CustomVarsListFilter.h | 3 +- livestatus/src/DoubleAggregator.cc | 2 +- livestatus/src/DoubleAggregator.h | 4 +- livestatus/src/DoubleFilter.cc | 8 +- livestatus/src/DoubleFilter.h | 3 +- livestatus/src/Filter.cc | 15 ++- livestatus/src/Filter.h | 8 +- livestatus/src/HostListFilter.cc | 14 +-- livestatus/src/HostListFilter.h | 3 +- livestatus/src/IntAggregator.cc | 2 +- livestatus/src/IntAggregator.h | 3 +- livestatus/src/IntFilter.cc | 26 ++-- livestatus/src/IntFilter.h | 9 +- livestatus/src/ListFilter.cc | 21 ++-- livestatus/src/ListFilter.h | 3 +- livestatus/src/NegatingFilter.cc | 2 +- livestatus/src/NegatingFilter.h | 3 +- livestatus/src/OringFilter.cc | 9 +- livestatus/src/OringFilter.h | 5 +- livestatus/src/PerfdataAggregator.cc | 17 ++- livestatus/src/PerfdataAggregator.h | 3 +- livestatus/src/Query.cc | 210 ++++++++++++++++----------------- livestatus/src/Query.h | 5 +- livestatus/src/Renderer.cc | 63 ++++------ livestatus/src/Renderer.h | 8 +- livestatus/src/RendererBrokenCSV.h | 3 +- livestatus/src/RendererCSV.cc | 13 +- livestatus/src/RendererCSV.h | 5 +- livestatus/src/RendererJSON.cc | 11 +- livestatus/src/RendererJSON.h | 5 +- livestatus/src/RendererPython.cc | 11 +- livestatus/src/RendererPython.h | 4 +- livestatus/src/RendererPython3.cc | 13 +- livestatus/src/RendererPython3.h | 4 +- livestatus/src/ServiceListFilter.cc | 19 ++- livestatus/src/ServiceListFilter.h | 3 +- livestatus/src/StringFilter.cc | 24 ++-- livestatus/src/StringFilter.h | 3 +- livestatus/src/VariadicFilter.cc | 21 ++-- livestatus/src/VariadicFilter.h | 3 +- 49 files changed, 321 insertions(+), 341 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=d9af35176e…
6 years, 11 months
1
0
0
0
Improved line number typing chaos, using the right type (size_t) as much as possible.
by Sven Panne
Module: check_mk Branch: master Commit: b31850d3f98316f75a4193146c51dbe1e861bf26 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b31850d3f98316…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Mon Oct 2 12:20:09 2017 +0200 Improved line number typing chaos, using the right type (size_t) as much as possible. Change-Id: I6347ff08544069e521e247e2e4cc6b18cb8c1fc6 --- livestatus/src/HostServiceState.h | 2 +- livestatus/src/LogEntry.cc | 4 ++-- livestatus/src/LogEntry.h | 6 ++++-- livestatus/src/Logfile.cc | 5 ++--- livestatus/src/Logfile.h | 6 +++--- livestatus/src/MonitoringCore.h | 2 +- livestatus/src/module.cc | 4 ++-- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/livestatus/src/HostServiceState.h b/livestatus/src/HostServiceState.h index 24852cb..adf89f7 100644 --- a/livestatus/src/HostServiceState.h +++ b/livestatus/src/HostServiceState.h @@ -46,7 +46,7 @@ class HostServiceState { public: bool _is_host; time_t _time; - int _lineno; + int32_t _lineno; time_t _from; time_t _until; diff --git a/livestatus/src/LogEntry.cc b/livestatus/src/LogEntry.cc index 91a58f4..b8c0856 100644 --- a/livestatus/src/LogEntry.cc +++ b/livestatus/src/LogEntry.cc @@ -38,8 +38,8 @@ static constexpr size_t timestamp_prefix_length = 13; // TODO(sp) Fix classifyLogMessage() below to always set all fields and remove // this set-me-to-zero-to-be-sure-block. -LogEntry::LogEntry(MonitoringCore *mc, unsigned lineno, string line) - : _lineno(lineno) +LogEntry::LogEntry(MonitoringCore *mc, size_t lineno, string line) + : _lineno(static_cast<int32_t>(lineno)) , _complete(std::move(line)) , _state(0) , _attempt(0) diff --git a/livestatus/src/LogEntry.h b/livestatus/src/LogEntry.h index f24267e..283a520 100644 --- a/livestatus/src/LogEntry.h +++ b/livestatus/src/LogEntry.h @@ -76,7 +76,9 @@ public: }; static constexpr uint32_t all_classes = 0xffffu; - unsigned _lineno; // line number in file + // TODO(sp): Wrong type, caused by TableLog accessing it via + // OffsetIntColumn, should be size_t + int32_t _lineno; // line number in file time_t _time; Class _logclass; LogEntryType _type; @@ -99,7 +101,7 @@ public: Command _command; // NOTE: line gets modified! - LogEntry(MonitoringCore *mc, unsigned lineno, std::string line); + LogEntry(MonitoringCore *mc, size_t lineno, std::string line); unsigned updateReferences(MonitoringCore *mc); static ServiceState parseServiceState(const std::string &str); static HostState parseHostState(const std::string &str); diff --git a/livestatus/src/Logfile.cc b/livestatus/src/Logfile.cc index 9079ff2..f4a5159 100644 --- a/livestatus/src/Logfile.cc +++ b/livestatus/src/Logfile.cc @@ -190,8 +190,7 @@ long Logfile::freeMessages(unsigned logclasses) { return freed; } -bool Logfile::processLogLine(uint32_t lineno, string line, - unsigned logclasses) { +bool Logfile::processLogLine(size_t lineno, string line, unsigned logclasses) { auto entry = make_unique<LogEntry>(_mc, lineno, std::move(line)); // ignored invalid lines if (entry->_logclass == LogEntry::Class::invalid) { @@ -258,7 +257,7 @@ bool Logfile::answerQueryReverse(Query *query, LogCache *logcache, time_t since, return true; } -uint64_t Logfile::makeKey(time_t t, unsigned lineno) { +uint64_t Logfile::makeKey(time_t t, size_t lineno) { return (static_cast<uint64_t>(t) << 32) | static_cast<uint64_t>(lineno); } diff --git a/livestatus/src/Logfile.h b/livestatus/src/Logfile.h index dd39c8e..072bde4 100644 --- a/livestatus/src/Logfile.h +++ b/livestatus/src/Logfile.h @@ -54,7 +54,7 @@ private: time_t _since; // time of first entry bool _watch; // true only for current logfile fpos_t _read_pos; // read until this position - uint32_t _lineno; // read until this line + size_t _lineno; // read until this line logfile_entries_t _entries; #ifdef CMC @@ -92,8 +92,8 @@ public: private: void loadRange(FILE *file, unsigned missing_types, LogCache *, time_t since, time_t until, unsigned logclasses); - bool processLogLine(uint32_t lineno, std::string line, unsigned logclasses); - uint64_t makeKey(time_t, unsigned); + bool processLogLine(size_t lineno, std::string line, unsigned logclasses); + uint64_t makeKey(time_t, size_t); Logger *logger() const; }; diff --git a/livestatus/src/MonitoringCore.h b/livestatus/src/MonitoringCore.h index 10c3e0e..44cce64 100644 --- a/livestatus/src/MonitoringCore.h +++ b/livestatus/src/MonitoringCore.h @@ -71,7 +71,7 @@ public: const Contact *contact) = 0; virtual std::chrono::system_clock::time_point last_logfile_rotation() = 0; - virtual uint32_t maxLinesPerLogFile() const = 0; + virtual size_t maxLinesPerLogFile() const = 0; virtual Command find_command(std::string name) const = 0; virtual std::vector<Command> commands() const = 0; diff --git a/livestatus/src/module.cc b/livestatus/src/module.cc index 5040d89..cc3ea64 100644 --- a/livestatus/src/module.cc +++ b/livestatus/src/module.cc @@ -122,7 +122,7 @@ static vector<ThreadInfo> fl_thread_info; static thread_local ThreadInfo *tl_info; size_t fl_max_cached_messages = 500000; // do never read more than that number of lines from a logfile -static uint32_t fl_max_lines_per_logfile = 1000000; +static size_t fl_max_lines_per_logfile = 1000000; size_t fl_max_response_size = 100 * 1024 * 1024; // limit answer to 10 MB int g_thread_running = 0; static AuthorizationKind fl_service_authorization = AuthorizationKind::loose; @@ -618,7 +618,7 @@ public: return {"", ""}; } - uint32_t maxLinesPerLogFile() const override { + size_t maxLinesPerLogFile() const override { return fl_max_lines_per_logfile; }
6 years, 11 months
1
0
0
0
A few more -Wshorten-64-to-32 fixes.
by Sven Panne
Module: check_mk Branch: master Commit: 3525343bbcf7d5d57c19091e42c33ebb47eb152f URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3525343bbcf7d5…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Mon Oct 2 13:44:08 2017 +0200 A few more -Wshorten-64-to-32 fixes. Change-Id: I07b4752c1f1c19b8c06d2be774739112877d839a --- livestatus/src/DowntimeOrComment.cc | 4 ++-- livestatus/src/DowntimeOrComment.h | 2 ++ livestatus/src/InputBuffer.cc | 7 ++++--- livestatus/src/LogEntry.h | 2 +- livestatus/src/Logfile.cc | 3 ++- livestatus/src/Store.cc | 3 +-- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/livestatus/src/DowntimeOrComment.cc b/livestatus/src/DowntimeOrComment.cc index 3dee1a7..32df461 100644 --- a/livestatus/src/DowntimeOrComment.cc +++ b/livestatus/src/DowntimeOrComment.cc @@ -44,8 +44,8 @@ Downtime::Downtime(nebstruct_downtime_struct *dt) , _start_time(dt->start_time) , _end_time(dt->end_time) , _fixed(dt->fixed) - , _duration(dt->duration) - , _triggered_by(dt->triggered_by) {} + , _duration(static_cast<int>(dt->duration)) + , _triggered_by(static_cast<int>(dt->triggered_by)) {} Comment::Comment(nebstruct_comment_struct *co) : DowntimeOrComment(reinterpret_cast<nebstruct_downtime_struct *>(co), diff --git a/livestatus/src/DowntimeOrComment.h b/livestatus/src/DowntimeOrComment.h index 70bf6bb..a647866 100644 --- a/livestatus/src/DowntimeOrComment.h +++ b/livestatus/src/DowntimeOrComment.h @@ -99,6 +99,8 @@ public: time_t _start_time; time_t _end_time; int _fixed; + // TODO(sp): Wrong types, caused by TableDowntimes accessing it via + // OffsetIntColumn, should be unsigned long int _duration; int _triggered_by; explicit Downtime(nebstruct_downtime_struct *dt); diff --git a/livestatus/src/InputBuffer.cc b/livestatus/src/InputBuffer.cc index ecc3a13..5ad9f7d 100644 --- a/livestatus/src/InputBuffer.cc +++ b/livestatus/src/InputBuffer.cc @@ -144,8 +144,9 @@ InputBuffer::Result InputBuffer::readRequest() { // of the buffer's content is already processed. So we simply // shift the yet unprocessed data to the very left of the buffer. else if (_read_index > 0) { - int shift_by = _read_index; // distance to beginning of buffer - int size = + size_t shift_by = + _read_index; // distance to beginning of buffer + size_t size = _write_index - _read_index; // amount of data to shift memmove(&_readahead_buffer[0], &_readahead_buffer[_read_index], size); @@ -176,7 +177,7 @@ InputBuffer::Result InputBuffer::readRequest() { return Result::request_read; } // non-empty line: belongs to current request - int length = r - _read_index; + size_t length = r - _read_index; for (size_t end = r; end > _read_index && (isspace(_readahead_buffer[--end]) != 0);) { length--; diff --git a/livestatus/src/LogEntry.h b/livestatus/src/LogEntry.h index 283a520..0d56ea7 100644 --- a/livestatus/src/LogEntry.h +++ b/livestatus/src/LogEntry.h @@ -78,7 +78,7 @@ public: // TODO(sp): Wrong type, caused by TableLog accessing it via // OffsetIntColumn, should be size_t - int32_t _lineno; // line number in file + int _lineno; // line number in file time_t _time; Class _logclass; LogEntryType _type; diff --git a/livestatus/src/Logfile.cc b/livestatus/src/Logfile.cc index f4a5159..515a1a8 100644 --- a/livestatus/src/Logfile.cc +++ b/livestatus/src/Logfile.cc @@ -151,7 +151,8 @@ void Logfile::loadRange(FILE *file, unsigned missing_types, LogCache *logcache, time_t since, time_t until, unsigned logclasses) { vector<char> linebuffer(65536); // TODO(sp) We should really use C++ I/O here... - while (fgets(&linebuffer[0], linebuffer.size(), file) != nullptr) { + while (fgets(&linebuffer[0], static_cast<int>(linebuffer.size()), file) != + nullptr) { if (_lineno >= _mc->maxLinesPerLogFile()) { Error(logger()) << "more than " << _mc->maxLinesPerLogFile() << " lines in " << _path << ", ignoring the rest!"; diff --git a/livestatus/src/Store.cc b/livestatus/src/Store.cc index b6bafc7..406c40b 100644 --- a/livestatus/src/Store.cc +++ b/livestatus/src/Store.cc @@ -195,8 +195,7 @@ bool Store::answerRequest(InputBuffer &input, OutputBuffer &output) { } void Store::answerCommandRequest(const char *command) { - int len = strlen(command); - if (len < 14 || command[0] != '[' || command[11] != ']' || + if (strlen(command) < 14 || command[0] != '[' || command[11] != ']' || command[12] != ' ') { Warning(logger()) << "Ignoring malformed command '" << command << "'"; return;
6 years, 11 months
1
0
0
0
Updated precompiled windows agent files
by Lars Michelsen
Module: check_mk Branch: master Commit: 1d2bfa8151f274ff46742cf9f9bf8c864d838f4d URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1d2bfa8151f274…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Oct 4 10:42:45 2017 +0200 Updated precompiled windows agent files Change-Id: If97d19dc81b768eeffa3ea729f6369824f404cb5 --- agents/Makefile | 2 +- agents/windows/Makefile | 9 ++++----- agents/windows/build_version | 2 +- agents/windows/check_mk_agent-64.exe | Bin 1568768 -> 1568768 bytes agents/windows/check_mk_agent-64.unstripped.exe | Bin 22974157 -> 22974157 bytes agents/windows/check_mk_agent-64.unversioned.exe | Bin 1568768 -> 1568768 bytes agents/windows/check_mk_agent.exe | Bin 1552384 -> 1552384 bytes agents/windows/check_mk_agent.msi | Bin 3395072 -> 3395072 bytes agents/windows/check_mk_agent.unstripped.exe | Bin 19784372 -> 19784372 bytes agents/windows/check_mk_agent.unversioned.exe | Bin 1552384 -> 1552384 bytes agents/windows/install_agent-64.exe | Bin 683168 -> 683171 bytes agents/windows/install_agent.exe | Bin 678265 -> 678268 bytes 12 files changed, 6 insertions(+), 7 deletions(-) diff --git a/agents/Makefile b/agents/Makefile index b094217..85de987 100644 --- a/agents/Makefile +++ b/agents/Makefile @@ -61,7 +61,7 @@ setversion: fi ; \ done ; \ $(MAKE) packages - $(MAKE) -C windows NEW_VERSION=$(NEW_VERSION) setversion + cd windows ; ./make-agent packages: rpm deb diff --git a/agents/windows/Makefile b/agents/windows/Makefile index 1c58698..899a938 100644 --- a/agents/windows/Makefile +++ b/agents/windows/Makefile @@ -46,9 +46,9 @@ ifneq (,$(MAKECMDGOALS)) endif # Check if called inside chroot jail. -#ifneq (WinAgent,$(CHROOTNAME)) -# $(error "Not allowed outside chroot. Please call './make-agent$(SEPARATOR)$(MAKECMDGOALS)' instead") -#endif +ifneq (WinAgent,$(CHROOTNAME)) + $(error "Not allowed outside chroot. Please call './make-agent$(SEPARATOR)$(MAKECMDGOALS)' instead") +endif ifeq ($(shell uname),Linux) CXX = i686-w64-mingw32-g++-posix @@ -65,8 +65,7 @@ all: directories fix_linebreaks check_mk_agent.exe check_mk_agent-64.exe install setversion: sed -i 's/!define CHECK_MK_VERSION .*/!define CHECK_MK_VERSION "'$(NEW_VERSION)'"/' installer*.nsi ; \ sed -ri 's/^(VERSION[[:space:]]*:?= *).*/\1'"$(NEW_VERSION)/" Makefile ; \ - rm check_mk_agent.exe check_mk_agent-64.exe check_mk_agent.msi ; \ - make install_agent.exe install_agent-64.exe msi_installer + $(MAKE) clean install_agent.exe install_agent-64.exe msi_installer # Converts all files which are targeted to a windows system to CRLF fix_linebreaks: diff --git a/agents/windows/build_version b/agents/windows/build_version index 5672c98..fc818e9 100644 --- a/agents/windows/build_version +++ b/agents/windows/build_version @@ -1 +1 @@ -2938 +2940 diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe index 4884f6a..461f508 100755 Binary files a/agents/windows/check_mk_agent-64.exe and b/agents/windows/check_mk_agent-64.exe differ diff --git a/agents/windows/check_mk_agent-64.unstripped.exe b/agents/windows/check_mk_agent-64.unstripped.exe index 9313547..ae30283 100755 Binary files a/agents/windows/check_mk_agent-64.unstripped.exe and b/agents/windows/check_mk_agent-64.unstripped.exe differ diff --git a/agents/windows/check_mk_agent-64.unversioned.exe b/agents/windows/check_mk_agent-64.unversioned.exe index 1c0c693..17842e2 100755 Binary files a/agents/windows/check_mk_agent-64.unversioned.exe and b/agents/windows/check_mk_agent-64.unversioned.exe differ diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe index e8eb7ee..7f1efc7 100755 Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe differ diff --git a/agents/windows/check_mk_agent.msi b/agents/windows/check_mk_agent.msi index 46ca8f7..17b83e0 100755 Binary files a/agents/windows/check_mk_agent.msi and b/agents/windows/check_mk_agent.msi differ diff --git a/agents/windows/check_mk_agent.unstripped.exe b/agents/windows/check_mk_agent.unstripped.exe index 6d31405..624767c 100755 Binary files a/agents/windows/check_mk_agent.unstripped.exe and b/agents/windows/check_mk_agent.unstripped.exe differ diff --git a/agents/windows/check_mk_agent.unversioned.exe b/agents/windows/check_mk_agent.unversioned.exe index d077a3f..7afb3ec 100755 Binary files a/agents/windows/check_mk_agent.unversioned.exe and b/agents/windows/check_mk_agent.unversioned.exe differ diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe index 70bec4d..4dc23be 100755 Binary files a/agents/windows/install_agent-64.exe and b/agents/windows/install_agent-64.exe differ diff --git a/agents/windows/install_agent.exe b/agents/windows/install_agent.exe index f89335c..196ac3e 100755 Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe differ
6 years, 11 months
1
0
0
0
Added test cases for event cancelling
by Lars Michelsen
Module: check_mk Branch: master Commit: 49c51f94bb1227b4cbdad90ecc2793420babe096 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=49c51f94bb1227…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Oct 4 10:17:19 2017 +0200 Added test cases for event cancelling Change-Id: I0a7df86c111e601da1458ae9b68adaa413a49df6 --- tests/mkeventd/test_mkeventd_status.py | 31 ++++++++----------------------- tests/testlib/__init__.py | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/tests/mkeventd/test_mkeventd_status.py b/tests/mkeventd/test_mkeventd_status.py index af608c8..b3d5a17 100644 --- a/tests/mkeventd/test_mkeventd_status.py +++ b/tests/mkeventd/test_mkeventd_status.py @@ -4,7 +4,7 @@ import pytest import time import ast -from testlib import web, ec, cmk_path +from testlib import web, ec, cmk_path, CMKEventConsole # # UNIT TESTS @@ -76,29 +76,14 @@ def test_handle_client(status_server, event_status): def test_mkevent_check_query_perf(config, status_server, event_status, perfcounters): - def new_event(num): - return { - "rule_id": 815, - "text": "%s %s BLA BLUB DINGELING ABASD AD R#@A AR@AR A@ RA@R A@RARAR ARKNLA@RKA@LRKNA@KRLNA@RLKNA@äRLKA@RNKAL@R" \ - " j:O#A@J$ KLA@J $L:A@J :AMW: RAMR@: RMA@:LRMA@ L:RMA@ :AL@R MA:L@RM A@:LRMA@ :RLMA@ R:LA@RMM@RL:MA@R: AM@" % \ - (time.time(), num), - "phase": "open", - "count": 1, - "time": time.time(), - "first": time.time(), - "last": time.time(), - "comment": "", - "host": "heute-%d" % num, - "ipaddress": "127.0.0.1", - "application": "", - "pid": 0, - "priority": 3, - "facility": 1, # user - "match_groups": (), - } - for n in range(10000): - event_status.new_event(new_event(n)) + event_status.new_event(CMKEventConsole.new_event({ + "host": "heute-%d" % num, + "text": "%s %s BLA BLUB DINGELING ABASD AD R#@A AR@AR A@ RA@R A@RARAR ARKNLA@RKA@LRKNA@KRLNA@RLKNA@äRLKA@RNKAL@R" \ + " j:O#A@J$ KLA@J $L:A@J :AMW: RAMR@: RMA@:LRMA@ L:RMA@ :AL@R MA:L@RM A@:LRMA@ :RLMA@ R:LA@RMM@RL:MA@R: AM@" % \ + (time.time(), num), + })) + assert len(event_status.events()) == 10000 s = FakeStatusSocket("GET events\n" diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py index 6a3c99d..195c346 100644 --- a/tests/testlib/__init__.py +++ b/tests/testlib/__init__.py @@ -1289,6 +1289,31 @@ class CMKEventConsole(CMKWebSession): assert config_reloaded() + @classmethod + def new_event(cls, attrs): + default_event = { + "rule_id": 815, + "text": "", + "phase": "open", + "count": 1, + "time": time.time(), + "first": time.time(), + "last": time.time(), + "comment": "", + "host": "test-host", + "ipaddress": "127.0.0.1", + "application": "", + "pid": 0, + "priority": 3, + "facility": 1, # user + "match_groups": (), + } + + event = default_event.copy() + event.update(attrs) + return event + + class CMKEventConsoleStatus(object): def __init__(self, address):
6 years, 11 months
1
0
0
0
EC: EventServer open sockets not during constructor call
by Lars Michelsen
Module: check_mk Branch: master Commit: 44a0bc70b859f2eb5e4e255d56b73efee37af5fe URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=44a0bc70b859f2…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Oct 4 09:41:35 2017 +0200 EC: EventServer open sockets not during constructor call Change-Id: I42753a4fcd7326905c86971b35446ad47c081baa --- bin/mkeventd | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bin/mkeventd b/bin/mkeventd index 57f26ae..86cba42 100755 --- a/bin/mkeventd +++ b/bin/mkeventd @@ -1240,12 +1240,6 @@ class EventServer(ECServerThread): self._snmptrap = None self._mib_resolver = None - self.create_pipe() - self.open_eventsocket() - self.open_syslog() - self.open_syslog_tcp() - self.open_snmptrap() - self._rules = [] self._hash_stats = [] for _unused_facility in xrange(32): @@ -1254,6 +1248,14 @@ class EventServer(ECServerThread): self.host_config = HostConfig() + def open_sockets(self): + self.create_pipe() + self.open_eventsocket() + self.open_syslog() + self.open_syslog_tcp() + self.open_snmptrap() + + @classmethod def status_columns(cls): columns = cls._general_columns() @@ -5126,6 +5128,7 @@ if __name__ == "__main__": g_status_server = StatusServer() g_status_server.open_sockets() g_event_server = EventServer() + g_event_server.open_sockets() g_event_status.load_status()
6 years, 11 months
1
0
0
0
Updated werk
by Simon Betz
Module: check_mk Branch: master Commit: ca7fb5762209ac9f6d03a9746884503d9c3e1072 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ca7fb5762209ac…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Wed Oct 4 09:38:59 2017 +0200 Updated werk Change-Id: I3714d97ad0b6fe27bdaabebae77c614c237819a2 --- .werks/5339 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.werks/5339 b/.werks/5339 index 217d13a..024638e 100644 --- a/.werks/5339 +++ b/.werks/5339 @@ -5,6 +5,6 @@ Compatible: compat Edition: cre Version: 1.5.0i1 Date: 1506692807 -Class: feature +Class: fix
6 years, 11 months
1
0
0
0
Fixed recently introduced issue during processing of COMMAND status calls
by Lars Michelsen
Module: check_mk Branch: master Commit: 8d5505b967a1f9f055c73bcdbb0b97825cf3c9a6 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8d5505b967a1f9…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Oct 4 08:29:46 2017 +0200 Fixed recently introduced issue during processing of COMMAND status calls Change-Id: I5efc86abd24da9c4380e5a9e72c8a82ca244c629 --- bin/mkeventd | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/bin/mkeventd b/bin/mkeventd index de1d389..a1e85a9 100755 --- a/bin/mkeventd +++ b/bin/mkeventd @@ -3598,7 +3598,7 @@ class StatusServer(ECServerThread): raise NotImplementedError() try: - self._answer_query(client_socket, query.output_format, response) + self._answer_query(client_socket, query, response) except socket.error as e: if e.errno == 32: # Broken pipe -> ignore this pass @@ -3608,24 +3608,31 @@ class StatusServer(ECServerThread): client_socket.close() - def _answer_query(self, client_socket, output_format, response): - if output_format == "plain": + # Only GET queries have customizable output formats. COMMAND is always + # a dictionay and COMMAND is always None and always output as "python" + def _answer_query(self, client_socket, query, response): + if query.method != "GET": + self._answer_query_python(client_socket, response) + return + + if query.output_format == "plain": for row in response: - client_socket.sendall("\t".join([quote_tab(c) for c in row])) - client_socket.sendall("\n") + client_socket.sendall("\t".join([quote_tab(c) for c in row])+"\n") - elif output_format == "json": - client_socket.sendall(json.dumps(list(response))) - client_socket.sendall("\n") + elif query.output_format == "json": + client_socket.sendall(json.dumps(list(response))+"\n") - elif output_format == "python": - client_socket.sendall(repr(list(response))) - client_socket.sendall("\n") + elif query.output_format == "python": + self._answer_query_python(client_socket, list(response)) else: raise NotImplementedError() + def _answer_query_python(self, client_socket, response): + client_socket.sendall(repr(response)+"\n") + + # All commands are already locked with lock_eventstatus def handle_command_request(self, commandline): self.logger.info("Executing command: %s" % commandline)
6 years, 11 months
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
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
Results per page:
10
25
50
100
200