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
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 2019
----- 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
15 participants
599 discussions
Start a n
N
ew thread
agent_aws: factor out determination of timestamp
by Moritz Kiemer
Module: check_mk Branch: master Commit: 61bb4e76438106d7f2c31395fc5dde8b1aeceac0 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=61bb4e76438106…
Author: Moritz Kiemer <mo(a)mathias-kettner.de> Date: Thu Apr 25 10:09:01 2019 +0200 agent_aws: factor out determination of timestamp Fix 'now' vs. 'mtime' bug along the way Change-Id: I922611d113c28ddde72bec1bcbce3fb994fb27da --- cmk/special_agents/agent_aws.py | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/cmk/special_agents/agent_aws.py b/cmk/special_agents/agent_aws.py index af11a32..590853e 100644 --- a/cmk/special_agents/agent_aws.py +++ b/cmk/special_agents/agent_aws.py @@ -638,23 +638,29 @@ class AWSSection(object): cache_timestamp = time.time() return AWSRawContent(raw_content, cache_timestamp) - def _cache_is_recent_enough(self, colleague_contents): + @property + def cache_timestamp(self): if not self._cache_file.exists(): - logging.info("New cache file %s", self._cache_file) - return False + return None - now = time.time() try: - mtime = self._cache_file.stat().st_mtime - except OSError as e: - if e.errno == 2: - logging.info("No such file or directory %s (calculate age)", self._cache_file) - return False - else: - logging.info("Cannot calculate cache file age: %s", e) - raise + return self._cache_file.stat().st_mtime + except OSError as exc: + if exc.errno == 2: + logging.info("No such file or directory %s (cache_timestamp)", self._cache_file) + return None + logging.info("Cannot calculate cache file age: %s", exc) + raise - age = now - mtime + def _cache_is_recent_enough(self, colleague_contents): + mtime = self.cache_timestamp + if mtime is None: + return False + + age = time.time() - mtime + if age < 0: + logging.info("Cache file from future considered invalid: %s", self._cache_file) + return False if age >= self.interval: logging.info("Cache file %s is outdated", self._cache_file) return False
5 years, 2 months
1
0
0
0
agent_aws: factor out validation by arguments
by Moritz Kiemer
Module: check_mk Branch: master Commit: 0137f8af61bc4b89c80238676f735bac26d1f352 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0137f8af61bc4b…
Author: Moritz Kiemer <mo(a)mathias-kettner.de> Date: Thu Apr 25 10:57:02 2019 +0200 agent_aws: factor out validation by arguments Change-Id: I130cda4248b9687798f89c1bf46ad7b961c05d9e --- cmk/special_agents/agent_aws.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/cmk/special_agents/agent_aws.py b/cmk/special_agents/agent_aws.py index 590853e..4987283 100644 --- a/cmk/special_agents/agent_aws.py +++ b/cmk/special_agents/agent_aws.py @@ -628,7 +628,8 @@ class AWSSection(object): # Cache is only used if the age is lower than section interval AND # the collected data from colleagues are not newer self._cache_file_dir.mkdir(parents=True, exist_ok=True) - if use_cache and self._cache_is_recent_enough(colleague_contents): + if (use_cache and self.get_validity_from_args(colleague_contents) and + self._cache_is_recent_enough()): raw_content, cache_timestamp = self._read_from_cache() else: raw_content = self._fetch_raw_content(colleague_contents) @@ -652,20 +653,26 @@ class AWSSection(object): logging.info("Cannot calculate cache file age: %s", exc) raise - def _cache_is_recent_enough(self, colleague_contents): + def _cache_is_recent_enough(self): mtime = self.cache_timestamp if mtime is None: return False age = time.time() - mtime + if 0 < age < self.interval: + return True + if age < 0: logging.info("Cache file from future considered invalid: %s", self._cache_file) - return False - if age >= self.interval: + else: logging.info("Cache file %s is outdated", self._cache_file) - return False + return False - if colleague_contents.cache_timestamp > mtime: + def get_validity_from_args(self, colleague_contents): + my_cache_timestamp = self.cache_timestamp + if my_cache_timestamp is None: + return False + if colleague_contents.cache_timestamp > my_cache_timestamp: logging.info("Colleague data is newer than cache file %s", self._cache_file) return False return True
5 years, 2 months
1
0
0
0
AWS instance creator: Lists can be generated by choices, Dicts can enumerate over keys
by Simon Betz
Module: check_mk Branch: master Commit: 3e431022e1284ab4e55ab7f7d1980549c602a369 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3e431022e1284a…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Thu Apr 25 10:01:28 2019 +0200 AWS instance creator: Lists can be generated by choices, Dicts can enumerate over keys Change-Id: Ib40d5b1796858a9c05b99a99db3457fdb8b7a247 --- .../agent_aws/agent_aws_fake_clients.py | 154 ++++++++++----------- 1 file changed, 74 insertions(+), 80 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=3e431022e1…
5 years, 2 months
1
0
0
0
agent_aws: Improved logging
by Simon Betz
Module: check_mk Branch: master Commit: 4768d35c6f247869105d6e287dfbcb0ac44afcc9 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4768d35c6f2478…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Thu Apr 25 13:38:28 2019 +0200 agent_aws: Improved logging Change-Id: I41f4d668cdc40da405774306c9fad8ada181eec3 --- cmk/special_agents/agent_aws.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmk/special_agents/agent_aws.py b/cmk/special_agents/agent_aws.py index 64dc8f6..af11a32 100644 --- a/cmk/special_agents/agent_aws.py +++ b/cmk/special_agents/agent_aws.py @@ -2761,7 +2761,7 @@ class AWSSections(object): if self._debug: raise except Exception as e: - logging.info(e) + logging.info("%s: %s", section.__class__.__name__, e) if self._debug: raise exceptions.append(e)
5 years, 2 months
1
0
0
0
agent_aws: Fixed comparing cache timestamps
by Simon Betz
Module: check_mk Branch: master Commit: 93cdec9fe7e122221ed358cb51da0af549ca9315 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=93cdec9fe7e122…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Wed Apr 24 14:40:37 2019 +0200 agent_aws: Fixed comparing cache timestamps Change-Id: I453cebbb2d6f8b2b6606f0faadab9717c654c82d --- cmk/special_agents/agent_aws.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmk/special_agents/agent_aws.py b/cmk/special_agents/agent_aws.py index cb3ed5f..1e2f411 100644 --- a/cmk/special_agents/agent_aws.py +++ b/cmk/special_agents/agent_aws.py @@ -645,7 +645,7 @@ class AWSSection(object): now = time.time() try: - age = now - self._cache_file.stat().st_mtime + mtime = self._cache_file.stat().st_mtime except OSError as e: if e.errno == 2: logging.info("No such file or directory %s (calculate age)", self._cache_file) @@ -654,11 +654,12 @@ class AWSSection(object): logging.info("Cannot calculate cache file age: %s", e) raise + age = now - mtime if age >= self.interval: logging.info("Cache file %s is outdated", self._cache_file) return False - if colleague_contents.cache_timestamp > now: + if colleague_contents.cache_timestamp > mtime: logging.info("Colleague data is newer than cache file %s", self._cache_file) return False return True
5 years, 2 months
1
0
0
0
agent_aws: Removed unnecessary distributor statement
by Simon Betz
Module: check_mk Branch: master Commit: ce9850a40e758734163da6543cc6ee3bc3bc4c14 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ce9850a40e7587…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Thu Apr 25 10:13:16 2019 +0200 agent_aws: Removed unnecessary distributor statement Change-Id: If25fcf6721acd5e5f27bc0b0a7fd8e20dd3a451e --- cmk/special_agents/agent_aws.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cmk/special_agents/agent_aws.py b/cmk/special_agents/agent_aws.py index 1e2f411..64dc8f6 100644 --- a/cmk/special_agents/agent_aws.py +++ b/cmk/special_agents/agent_aws.py @@ -2927,7 +2927,6 @@ class AWSSectionsGeneric(AWSSections): ec2_summary_distributor.add(ec2_security_groups) ec2_summary_distributor.add(ec2) ec2_summary_distributor.add(ebs_summary) - ec2_summary_distributor.add(ebs) ebs_limits_distributor.add(ebs_summary) ebs_summary_distributor.add(ebs)
5 years, 2 months
1
0
0
0
Make IWYU happy again.
by Sven Panne
Module: check_mk Branch: master Commit: b7902369fc539f05f1ed97e8eabadbc09fa8a4f9 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b7902369fc539f…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Thu Apr 25 15:46:32 2019 +0200 Make IWYU happy again. Change-Id: I98ebf0d248e19716e7b1873a92b38bcc3dd4bf3f --- livestatus/src/test/test_OffsetStringMacroColumn.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/livestatus/src/test/test_OffsetStringMacroColumn.cc b/livestatus/src/test/test_OffsetStringMacroColumn.cc index 61100f1..f7379f0 100644 --- a/livestatus/src/test/test_OffsetStringMacroColumn.cc +++ b/livestatus/src/test/test_OffsetStringMacroColumn.cc @@ -8,6 +8,7 @@ #include "OffsetStringServiceMacroColumn.h" #include "Row.h" #include "Store.h" +#include "data_encoding.h" #include "gtest/gtest.h" #include "nagios.h"
5 years, 2 months
1
0
0
0
Use compiledb instead of Bear for generation of compile_command.json.
by Sven Panne
Module: check_mk Branch: master Commit: 5fb9bde157ffd4c135fb379451b4c5e385bab0cf URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5fb9bde157ffd4…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Wed Apr 17 16:22:07 2019 +0200 Use compiledb instead of Bear for generation of compile_command.json. This removes the need for a "make clean", speeding up things considerably: >From a few minutes down to 1-2 seconds. CMK-2026 Change-Id: Ib1ac51d164ac0839947e734b165bfbd8d17a15cd --- Makefile | 18 ----------- Pipfile | 2 ++ Pipfile.lock | 33 +++++++++++---------- livestatus/src/Makefile.am | 7 +++-- livestatus/src/test/Makefile.am | 15 +++++----- .../python-modules/src/compiledb-1604e14.tar.gz | Bin 0 -> 26748 bytes 6 files changed, 31 insertions(+), 44 deletions(-) diff --git a/Makefile b/Makefile index 5f62bb9..562bc3a 100644 --- a/Makefile +++ b/Makefile @@ -44,24 +44,6 @@ export DOXYGEN := doxygen export IWYU_TOOL := iwyu_tool PIPENV := PIPENV_NO_INHERIT=true PIPENV_VENV_IN_PROJECT=true pipenv -# The Bear versions have a slightly tragic history: Due to the clang bug -#
https://llvm.org/bugs/show_bug.cgi?id=24710
we need absolute paths in our -# compilation database. Furthermore, gcc and clang have slightly different -# behavior regarding include paths when the -I flag contains a relative path and -# symlinks are involved, so this is yet another reason to use absolute paths. -# -# Consequently, we upstreamed a fix for this to the Bear project, see -#
https://github.com/rizsotto/Bear/commit/fb1645de9
. This fix lived happily in -# the Bear releases 2.1.4, 2.1.5, and 2.2.0, but after that, some "improvements" -# broke the fix again. :-/ Until a new fix has been upstreamed, make sure that -# that you use the right Bear. -# -# To install a working version locally, just do: -# git clone
https://github.com/rizsotto/Bear.git
&& cd Bear && git checkout 2.2.0 && cmake -DCMAKE_INSTALL_PREFIX=$HOME/local/Bear-2.2.0 && make install -# and put $HOME/local/Bear-2.2.0/bin into your PATH or set the make variable -# below accordingly. -export BEAR := bear - M4_DEPS := $(wildcard m4/*) configure.ac CONFIGURE_DEPS := $(M4_DEPS) aclocal.m4 CONFIG_DEPS := ar-lib compile config.guess config.sub install-sh missing depcomp configure diff --git a/Pipfile b/Pipfile index 3a0bbe1..e8dcf8c 100644 --- a/Pipfile +++ b/Pipfile @@ -22,6 +22,8 @@ mockldap = "*" isort = "*" pdbpp = "*" freezegun = "*" +# We have to use a snapshot, a version which works for us has not been released yet. :-/ +compiledb = {path = "./omd/packages/python-modules/src/compiledb-1604e14.tar.gz"} [packages] setuptools_scm = "==3.1.0" diff --git a/Pipfile.lock b/Pipfile.lock index f385dc3..10ee1d5 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "83a7380c34db5a6b6c328bdb8653925a3329bbe21942d086bc01b01841e9e59e" + "sha256": "db23de596318955f08951a87dca949d06ee2387f1aecfbc2903377c576fa5f6b" }, "pipfile-spec": 6, "requires": { @@ -1010,7 +1010,7 @@ "sha256:9d98697f088eb1b0fa451391f91afb5e3ebde16bbdb272819fd091151fda4f1a", "sha256:f0b0e4eba956de51238e17573b7087e852dfe9854afd2e9c873f73fc0ca0a6dd" ], - "markers": "python_version == '2.7'", + "markers": "python_version < '3.2'", "version": "==1.5" }, "backports.ssl-match-hostname": { @@ -1053,6 +1053,9 @@ "index": "pypi", "version": "==3.0.4" }, + "compiledb": { + "path": "./omd/packages/python-modules/src/compiledb-1604e14.tar.gz" + }, "configparser": { "hashes": [ "sha256:5308b47021bc2340965c371f0f058cc6971a04502638d4244225c49d80db273a" @@ -1318,10 +1321,10 @@ }, "pdbpp": { "hashes": [ - "sha256:3936ed6c145d9bebad9f532a20796d7022fc251ad6b041adc56b67839efd5173" + "sha256:ee7eab02ecf32d92bd66b45eedb9bda152fa13f7be0dceb7050413a52cbbc4dd" ], "index": "pypi", - "version": "==0.9.15" + "version": "==0.10.0" }, "pluggy": { "hashes": [ @@ -1379,17 +1382,17 @@ }, "pyrepl": { "hashes": [ - "sha256:3bcbbf1e47d2b80819b805aceea16dc90832ba4800035d595fa3c4bf48fcd4d7" + "sha256:292570f34b5502e871bbb966d639474f2b57fbfcd3373c2d6a2f3d56e681a775" ], - "version": "==0.8.4" + "version": "==0.9.0" }, "pytest": { "hashes": [ - "sha256:13c5e9fb5ec5179995e9357111ab089af350d788cbc944c628f3cde72285809b", - "sha256:f21d2f1fb8200830dcbb5d8ec466a9c9120e20d8b53c7585d180125cce1d297a" + "sha256:3773f4c235918987d51daf1db66d51c99fac654c81d6f2f709a046ab446d5e5d", + "sha256:b7802283b70ca24d7119b32915efa7c409982f59913c1a6c0640aacf118b95f5" ], "index": "pypi", - "version": "==4.4.0" + "version": "==4.4.1" }, "pytest-cov": { "hashes": [ @@ -1401,11 +1404,11 @@ }, "pytest-mock": { "hashes": [ - "sha256:330bfa1a71c9b6e84e2976f01d70d8a174f755e7f9dc5b22f4b7335992e1e98b", - "sha256:cea3983a1ebc88bf7c0fa1ed8c84e67b898bf71a320a49605bcb74f31e6cfd6a" + "sha256:43ce4e9dd5074993e7c021bb1c22cbb5363e612a2b5a76bc6d956775b10758b7", + "sha256:5bf5771b1db93beac965a7347dc81c675ec4090cb841e49d9d34637a25c30568" ], "index": "pypi", - "version": "==1.10.3" + "version": "==1.10.4" }, "python-dateutil": { "hashes": [ @@ -1492,10 +1495,10 @@ }, "soupsieve": { "hashes": [ - "sha256:3aef141566afd07201b525c17bfaadd07580a8066f82b57f7c9417f26adbd0a3", - "sha256:e41a65e99bd125972d84221022beb1e4b5cfc68fa12c170c39834ce32d1b294c" + "sha256:6898e82ecb03772a0d82bd0d0a10c0d6dcc342f77e0701d0ec4a8271be465ece", + "sha256:b20eff5e564529711544066d7dc0f7661df41232ae263619dede5059799cdfca" ], - "version": "==1.9" + "version": "==1.9.1" }, "stevedore": { "hashes": [ diff --git a/livestatus/src/Makefile.am b/livestatus/src/Makefile.am index e5d021d..a387340 100644 --- a/livestatus/src/Makefile.am +++ b/livestatus/src/Makefile.am @@ -24,7 +24,6 @@ CLANG_VERSION ?= 7 -BEAR ?= bear CPPCHECK ?= cppcheck DOXYGEN ?= doxygen IWYU_TOOL ?= iwyu_tool @@ -177,9 +176,11 @@ livestatus.o: $(liblivestatus_a_OBJECTS) $(CXX) $(liblivestatus_a_CXXFLAGS) $(CXXFLAGS) NagiosMockup.o $@ -o NagiosMockup $(RM) NagiosMockup +# NOTE: cppcheck up to 7287ffe (2019-04-15) understands only the old "command +# style", so we have to stick with that for now. :-/ compile_commands.json: Makefile $(wildcard *.cc *.h) - $(MAKE) clean - $(BEAR) $(MAKE) -j4 + $(MAKE) -C $(top_srcdir) .venv + $(MAKE) -Bnwk | pipenv run compiledb --command-style tidy: compile_commands.json $(RUN_CLANG_TIDY) -quiet -j6 $(FILES_TO_CHECK) diff --git a/livestatus/src/test/Makefile.am b/livestatus/src/test/Makefile.am index a7baf5c..fcc0be9 100644 --- a/livestatus/src/test/Makefile.am +++ b/livestatus/src/test/Makefile.am @@ -30,7 +30,6 @@ CLANG_VERSION ?= 7 -BEAR ?= bear CPPCHECK ?= cppcheck IWYU_TOOL ?= iwyu_tool RUN_CLANG_TIDY ?= \ @@ -39,7 +38,7 @@ RUN_CLANG_TIDY ?= \ -clang-apply-replacements-binary=clang-apply-replacements-$(CLANG_VERSION) VALGRIND ?= $(shell valgrind --version > /dev/null 2>&1 && echo "valgrind --quiet") -GOOGLETEST :=$(top_srcdir)/omd/packages/googletest +GOOGLETEST := $(top_srcdir)/omd/packages/googletest bin_PROGRAMS = test_neb @@ -73,16 +72,16 @@ unit-test: test_neb$(EXEEXT) # where we just install our build dependencies. $(test_neb_SOURCES): build_googletest +# HACK: Avoid recompilation caused by make's -B flag build_googletest: - $(MAKE) -C $(GOOGLETEST) build + bash -c "make -C $(GOOGLETEST) build" > /dev/null +# NOTE: cppcheck up to 7287ffe (2019-04-15) understands only the old "command +# style", so we have to stick with that for now. :-/ compile_commands.json: Makefile $(wildcard *.cc *.h) - $(MAKE) clean -# HACK: bear doeesn't have an option to exclude some parts in the output, so we -# make sure that googletest is built first. We don't want to include that... - $(MAKE) -C ../../.. config.status + $(MAKE) -C $(top_srcdir) .venv $(MAKE) -j4 -C .. - $(BEAR) $(MAKE) -j4 test_neb + $(MAKE) -Bnwk | PIPENV_MAX_DEPTH=4 pipenv run compiledb --command-style tidy: compile_commands.json $(RUN_CLANG_TIDY) -quiet -j6 $(FILES_TO_CHECK) diff --git a/omd/packages/python-modules/src/compiledb-1604e14.tar.gz b/omd/packages/python-modules/src/compiledb-1604e14.tar.gz new file mode 100644 index 0000000..48fb963 Binary files /dev/null and b/omd/packages/python-modules/src/compiledb-1604e14.tar.gz differ
5 years, 2 months
1
0
0
0
agent_aws: Fixed confusion of different labels sections
by Simon Betz
Module: check_mk Branch: master Commit: 72ae64443fd20cd8b6f6652977fc4ac8f1624bec URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=72ae64443fd20c…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Thu Apr 25 14:19:49 2019 +0200 agent_aws: Fixed confusion of different labels sections Change-Id: I002c3b1309525001ae9f7a1db662eb0ee75815ba --- cmk/special_agents/agent_aws.py | 14 +++++++++----- .../cmk/special_agents/agent_aws/test_agent_aws_ec2.py | 2 +- .../cmk/special_agents/agent_aws/test_agent_aws_elb.py | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cmk/special_agents/agent_aws.py b/cmk/special_agents/agent_aws.py index 4da6a12..cb3ed5f 100644 --- a/cmk/special_agents/agent_aws.py +++ b/cmk/special_agents/agent_aws.py @@ -778,10 +778,6 @@ class AWSSectionLimits(AWSSection): class AWSSectionLabels(AWSSection): __metaclass__ = abc.ABCMeta - @property - def name(self): - return "labels" - def _create_results(self, computed_content): assert isinstance( computed_content.content, @@ -1199,6 +1195,10 @@ class EC2Summary(AWSSectionGeneric): class EC2Labels(AWSSectionLabels): @property + def name(self): + return "ec2_labels" + + @property def interval(self): return 300 @@ -1729,6 +1729,10 @@ class ELBLabelsGeneric(AWSSectionLabels): self._resource = resource @property + def name(self): + return "elb_generic_labels" + + @property def interval(self): return 300 @@ -2799,7 +2803,7 @@ class AWSSections(object): self._write_section_result(section_name, cached_suffix, result) def _write_section_result(self, section_name, cached_suffix, result): - if section_name == "labels": + if section_name.endswith("labels"): section_header = "<<<%s:sep(0)%s>>>\n" % (section_name, cached_suffix) else: section_header = "<<<aws_%s%s>>>\n" % (section_name, cached_suffix) diff --git a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_ec2.py b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_ec2.py index 5c5f3c0..2c95ad0 100644 --- a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_ec2.py +++ b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_ec2.py @@ -894,7 +894,7 @@ def test_agent_aws_ec2_result_distribution(): #--EC2Labels------------------------------------------------------------ assert ec2_labels.interval == 300 - assert ec2_labels.name == "labels" + assert ec2_labels.name == "ec2_labels" #--EC2SecurityGroups---------------------------------------------------- assert ec2_security_groups.interval == 300 diff --git a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_elb.py b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_elb.py index 89490dd..c0d34f7 100644 --- a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_elb.py +++ b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_elb.py @@ -416,7 +416,7 @@ def test_agent_aws_elb_result_distribution(tags, found_instances, found_instance #--ELBLabels------------------------------------------------------------ assert elb_labels.interval == 300 - assert elb_labels.name == "labels" + assert elb_labels.name == "elb_generic_labels" assert len(elb_labels_results) == len(found_instances_with_labels) for result in elb_labels_results: assert result.piggyback_hostname in found_instances_with_labels
5 years, 2 months
1
0
0
0
Thread long output through state history cache.
by Sven Panne
Module: check_mk Branch: master Commit: d076e51b76dc7c68eeba0aac0846a2a39141710b URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d076e51b76dc7c…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Wed Apr 24 16:12:54 2019 +0200 Thread long output through state history cache. Some minor tweaks on the way. CMK-1364 Change-Id: I913471df108c1a5b111b97072cbaeea339de9c80 --- livestatus/src/Store.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/livestatus/src/Store.h b/livestatus/src/Store.h index 03c02bf..04ed7a4 100644 --- a/livestatus/src/Store.h +++ b/livestatus/src/Store.h @@ -90,7 +90,8 @@ public: void tryFinishStatehistCache(); bool addObjectHistcache(Object *object); void addAlertToStatehistCache(Object *object, int state, - const char *output); + const std::string &output, + const std::string &long_output); void addDowntimeToStatehistCache(Object *object, bool started); void addFlappingToStatehistCache(Object *object, bool started); #else
5 years, 2 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
60
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Results per page:
10
25
50
100
200