Module: check_mk
Branch: master
Commit: 397a1d72406c6527b675460332b7aacd33bcfcb2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=397a1d72406c65…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Fri Apr 21 17:49:35 2017 +0200
4625 FIX mk_oracle: Fixed configuration for remote instances in bakery
There has been a mistake causing an incorrect configuration for remote
instances. In the confiugration created by the agent bakery the information for
the piggyhost was missing. With this a connection could not be established,
because of the consequential errors. Also this error has always been present
since the bakery feature for oracle has been introduced.
Change-Id: If5b1b61f031b8564706790d347f0f7ff134c45d3
---
.werks/4625 | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/.werks/4625 b/.werks/4625
new file mode 100644
index 0000000..7a7316a
--- /dev/null
+++ b/.werks/4625
@@ -0,0 +1,14 @@
+Title: mk_oracle: Fixed configuration for remote instances in bakery
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1492789655
+Class: fix
+
+There has been a mistake causing an incorrect configuration for remote
+instances. In the confiugration created by the agent bakery the information for
+the piggyhost was missing. With this a connection could not be established,
+because of the consequential errors. Also this error has always been present
+since the bakery feature for oracle has been introduced.
Module: check_mk
Branch: master
Commit: 84b51434c7ed485a725f34fbb34c352ed43cd236
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=84b51434c7ed48…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Apr 25 10:54:04 2017 +0200
4600 Network scan: Can now be configured to be executed only in a given time frame
Instead of being scheduled over the whole day you can now configure the network scan
of a folder to be executed in a time frame.
Change-Id: I53779a451964b80d69a1b61eeba24868a8063588
---
.werks/4600 | 11 ++++++++++
web/htdocs/watolib.py | 40 ++++++++++++++++++++++++++++------
web/plugins/wato/builtin_attributes.py | 5 +++++
3 files changed, 49 insertions(+), 7 deletions(-)
diff --git a/.werks/4600 b/.werks/4600
new file mode 100644
index 0000000..837c7fd
--- /dev/null
+++ b/.werks/4600
@@ -0,0 +1,11 @@
+Title: Network scan: Can now be configured to be executed only in a given time frame
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1493110366
+Class: feature
+
+Instead of being scheduled over the whole day you can now configure the network scan
+of a folder to be executed in a time frame.
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 36ac0b0..1073b42 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -1607,13 +1607,39 @@ class CREFolder(BaseFolder):
# None: No network scan is enabled.
# timestamp: Next planned run according to config.
def next_network_scan_at(self):
- if "network_scan" in self._attributes:
- interval = self._attributes["network_scan"]["scan_interval"]
- last_end = self._attributes.get("network_scan_result", {}).get("end", None)
- if last_end == None:
- return time.time()
- else:
- return last_end + interval
+ if "network_scan" not in self._attributes:
+ return
+
+ interval = self._attributes["network_scan"]["scan_interval"]
+ last_end = self._attributes.get("network_scan_result", {}).get("end", None)
+ if last_end == None:
+ next_time = time.time()
+ else:
+ next_time = last_end + interval
+
+ time_allowed = self._attributes["network_scan"].get("time_allowed")
+ if time_allowed == None:
+ return next_time # No time frame limit
+
+ # First transform the time given by the user to UTC time
+ brokentime = list(time.localtime(next_time))
+ brokentime[3], brokentime[4] = time_allowed[0]
+ start_time = time.mktime(brokentime)
+
+ brokentime[3], brokentime[4] = time_allowed[1]
+ end_time = time.mktime(brokentime)
+
+ # In case the next time is earlier than the allowed time frame at a day set
+ # the time to the time frame start.
+ # In case the next time is in the time frame leave it at it's value.
+ # In case the next time is later then advance one day to the start of the
+ # time frame.
+ if next_time < start_time:
+ next_time = start_time
+ elif next_time > end_time:
+ next_time = start_time + 86400
+
+ return next_time
# .-----------------------------------------------------------------------.
diff --git a/web/plugins/wato/builtin_attributes.py b/web/plugins/wato/builtin_attributes.py
index f18638a..34a014e 100644
--- a/web/plugins/wato/builtin_attributes.py
+++ b/web/plugins/wato/builtin_attributes.py
@@ -274,6 +274,11 @@ class NetworkScanAttribute(ValueSpecAttribute):
default_value = 60*60*24,
minvalue = 3600, # 1 hour
)),
+ ("time_allowed", TimeofdayRange(
+ title = _("Time allowed"),
+ help = _("Limit the execution of the scan to this time range."),
+ allow_empty=False,
+ )),
("max_parallel_pings", Integer(
title = _("Parallel pings to send"),
help = _("Set the maximum number of concurrent pings sent to target IP "
Module: check_mk
Branch: master
Commit: 1ebe1c830219ab8333cee135e3546633ef0f1cf0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ebe1c830219ab…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 24 13:55:16 2017 +0200
Site editing now validates that site IDs match when connecting with "local site"
Change-Id: I2928587dc2b1d5c81128289b967a274dbd613ede
---
web/htdocs/wato.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 5045f41..dcbc7e8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9685,9 +9685,15 @@ class ModeEditSite(ModeSites):
self._new_site["socket"] = "tcp:%s:%d" % method[1]
elif method:
self._new_site["socket"] = method
+
elif "socket" in self._new_site:
del self._new_site["socket"]
+ if method == None and self._site_id != config.omd_site():
+ raise MKUserError("method_sel", _("You can only configure a local site connection for "
+ "the local site. The site IDs ('%s' and '%s') are "
+ "not equal.") % (self._site_id, config.omd_site()))
+
# Timeout
if self._timeout != "":
try:
Module: check_mk
Branch: master
Commit: 6ef77db9d4275494a4796ff61604fc33882b3011
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6ef77db9d42754…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Mon Apr 24 17:17:03 2017 +0200
4638 FIX esx_vsphere_hostsystem.multipath: Fixed compatibility to older versions
Some older versions of vsphere could have some unusual multipath syntax in
output which lead into a crash. This is now fixed.
Change-Id: I438b49cfb0f8ad6c6d6e7faf3d177ef3bd677517
---
.werks/4638 | 11 +++++++++++
checks/esx_vsphere_hostsystem | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/4638 b/.werks/4638
new file mode 100644
index 0000000..ce7a980
--- /dev/null
+++ b/.werks/4638
@@ -0,0 +1,11 @@
+Title: esx_vsphere_hostsystem.multipath: Fixed compatibility to older versions
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1493046828
+Class: fix
+
+Some older versions of vsphere could have some unusual multipath syntax in
+output which lead into a crash. This is now fixed.
diff --git a/checks/esx_vsphere_hostsystem b/checks/esx_vsphere_hostsystem
index c91e82b..ac305f4 100644
--- a/checks/esx_vsphere_hostsystem
+++ b/checks/esx_vsphere_hostsystem
@@ -398,7 +398,7 @@ def esx_vsphere_multipath_convert(info):
data = zip(data[::2], data[1::2])
for path, state in data:
# vSphere6 uses a different format, e.g "vmhba32:C0:T0:L0 active"
- if len(path.split(":")) == 4:
+ if len(path.split(":")) == 4 and path.startswith("vmhba"):
hba_num = int(path.split(":")[0].replace("vmhba", ""))
lun_id = path.split(":")[-1]