Module: check_mk
Branch: master
Commit: 3213453dd9b033f629b71468f4e770ab4a6aaac2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3213453dd9b033…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Oct 12 16:09:23 2018 +0200
Cleaned up temporary fix for docker tests
Change-Id: Ia28f77ad09ff69b88ea5c0730c90fb25654488bb
---
tests/docker/test_docker.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/tests/docker/test_docker.py b/tests/docker/test_docker.py
index 2862a92..5e445a5 100644
--- a/tests/docker/test_docker.py
+++ b/tests/docker/test_docker.py
@@ -282,12 +282,8 @@ def test_update(request, client, version):
# Pick a random old version that we can use to the setup the initial site with
# Later this site is being updated to the current daily build
old_version = testlib.CMKVersion(
- # TODO: temporary fix because 1.5.0p3 image does not have the --no-tmpfs option. Remove this
- # once 1.5.0p5 is released
- version="2018.09.25",
+ version="1.5.0p5",
branch="1.5.0",
- #version="1.5.0p5",
- #branch="1.5.0",
edition=testlib.CMKVersion.CEE,
)
Module: check_mk
Branch: master
Commit: 52edcd96dbd49a7dc2b0357a1e0f0db916e2c90a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=52edcd96dbd49a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Oct 12 15:04:38 2018 +0200
6783 FIX Fixed audit log not showing todays entries when "current date" is selected
The audit log of WATO shows the entries of the "current date" by default. In some
cases it could happen that the entries of the current day were not shown by default.
The page displayed yesterdays entries instead.
Workaround: Selecting todays date below the option "Start log from" shows the current
entries.
Change-Id: Ie51259c2bfd146d648670d85e64b2beb78536419
---
.werks/6783 | 16 ++++++++++++++++
cmk/gui/wato/pages/audit_log.py | 3 ++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.werks/6783 b/.werks/6783
new file mode 100644
index 0000000..88489d2
--- /dev/null
+++ b/.werks/6783
@@ -0,0 +1,16 @@
+Title: Fixed audit log not showing todays entries when "current date" is selected
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1538594395
+
+The audit log of WATO shows the entries of the "current date" by default. In some
+cases it could happen that the entries of the current day were not shown by default.
+The page displayed yesterdays entries instead.
+
+Workaround: Selecting todays date below the option "Start log from" shows the current
+entries.
diff --git a/cmk/gui/wato/pages/audit_log.py b/cmk/gui/wato/pages/audit_log.py
index 1a65768..985a9be 100644
--- a/cmk/gui/wato/pages/audit_log.py
+++ b/cmk/gui/wato/pages/audit_log.py
@@ -176,7 +176,8 @@ class ModeAuditLog(WatoMode):
def _get_start_date(self):
if self._options["start"] == "now":
- return int(time.time()) / 86400 * 86400
+ st = time.localtime()
+ return int(time.mktime(time.struct_time((st.tm_year, st.tm_mon, st.tm_mday, 0, 0, 0, 0, 0, 0))))
return int(self._options["start"][1])
Module: check_mk
Branch: master
Commit: d609c77ab0b0c303d7e93f436c934b2960e3ff12
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d609c77ab0b0c3…
Author: Kenneth Okoh <ko(a)mathias-kettner.de>
Date: Fri Oct 12 10:11:13 2018 +0200
hp_proliant_psu: Refactored handling of PSU Total from check to parse function
Change-Id: I71e059776bda85b1fbd3abb6104dd7f65648026c
---
checks/hp_proliant_psu | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/checks/hp_proliant_psu b/checks/hp_proliant_psu
index f6040c5..f6c34c0 100644
--- a/checks/hp_proliant_psu
+++ b/checks/hp_proliant_psu
@@ -53,6 +53,10 @@ def parse_hp_proliant_psu(info):
int(used), int(capacity_maximum))
except ValueError:
pass
+ if parsed:
+ PsuTotal = collections.namedtuple("Psu", ['used', 'max'])
+ parsed['Total'] = PsuTotal(sum(v.used for v in parsed.values()),
+ sum(v.max for v in parsed.values()))
return parsed
@@ -60,23 +64,17 @@ def inventory_hp_proliant_psu(parsed):
"""Inventorizes all present PSUs, as well as the Sum over all PSUs"""
for item in parsed:
yield item, None
- yield 'Total', None
def check_hp_proliant_psu(item, params, parsed):
-
psu = parsed.get(item)
- if psu is not None:
+ if psu is None:
+ yield 3, "item not found in snmp data"
+ return
+ elif item != 'Total':
yield 0, "Chassis %s/Bay %s" % (psu.chassis, psu.bay)
snmp_state, status = condition_map[psu.condition]
yield status, 'State: "%s"' % snmp_state
- elif item != 'Total':
- yield 3, "item not found in snmp data"
- return
- else: # compute Total
- PsuTotal = collections.namedtuple("Psu", ['used', 'max'])
- psu = PsuTotal(sum(v.used for v in parsed.values()),
- sum(v.max for v in parsed.values()))
# usage info
info = 'Usage: %d Watts' % psu.used