Module: check_mk
Branch: master
Commit: 81cadb706bcd520b32b3967e71c28dae1207ef21
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=81cadb706bcd52…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 7 07:02:58 2018 +0100
Fixed recently damaged "empty folder" menu
Change-Id: Id369d2c88e1b426b0f9ce6df02c9e03614d661a2
---
web/htdocs/wato.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 515326e..3fb5faa 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -649,15 +649,15 @@ class ModeFolder(WatoMode):
if not self._folder.locked_hosts():
menu_items.extend([
- ("newhost", _("Create new host"), "new", "hosts",
+ MenuItem("newhost", _("Create new host"), "new", "hosts",
_("Add a new host to the monitoring (agent must be installed)")),
- ("newcluster", _("Create new cluster"), "new_cluster", "hosts",
+ MenuItem("newcluster", _("Create new cluster"), "new_cluster", "hosts",
_("Use Check_MK clusters if an item can move from one host "
"to another at runtime"))])
if not self._folder.locked_subfolders():
menu_items.extend([
- ("newfolder", _("Create new folder"), "newfolder", "hosts",
+ MenuItem("newfolder", _("Create new folder"), "newfolder", "hosts",
_("Folders group your hosts, can inherit attributes and can have permissions."))
])
@@ -12050,9 +12050,9 @@ class ModeHostTags(WatoMode, watolib.HosttagsConfiguration):
def page(self):
if not self._hosttags + self._auxtags:
MainMenu([
- ("edit_hosttag", _("Create new tag group"), "new", "hosttags",
+ MenuItem("edit_hosttag", _("Create new tag group"), "new", "hosttags",
_("Each host tag group will create one dropdown choice in the host configuration.")),
- ("edit_auxtag", _("Create new auxiliary tag"), "new", "hosttags",
+ MenuItem("edit_auxtag", _("Create new auxiliary tag"), "new", "hosttags",
_("You can have these tags automatically added if certain primary tags are set.")),
]).show()
Module: check_mk
Branch: master
Commit: fbd9ab0690257e08812350135c02ed0d6a01547d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fbd9ab0690257e…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Tue Mar 6 18:11:27 2018 +0100
5909 FIX fortigate_sessions, fortigate_cpu: Fixed duplicated discovery if needed information is at two places
Fortigate changed obviously the location of information for cpu utilization
and sessions in the past. We support these by using two different check
plugins. With this fix the service discovery does not create duplicated
services anymore if both paths are present on the device. Instead the newer
path will be preferred.
Change-Id: I2c4bd51e629c47e14988ba6d4e8d83870b90d64f
---
.werks/5909 | 14 ++++++++++++++
checks/fortigate_cpu | 3 ++-
checks/fortigate_sessions | 3 ++-
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/.werks/5909 b/.werks/5909
new file mode 100644
index 0000000..ff63039
--- /dev/null
+++ b/.werks/5909
@@ -0,0 +1,14 @@
+Title: fortigate_sessions, fortigate_cpu: Fixed duplicated discovery if needed information is at two places
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i4
+Date: 1520356129
+Class: fix
+
+Fortigate changed obviously the location of information for cpu utilization
+and sessions in the past. We support these by using two different check
+plugins. With this fix the service discovery does not create duplicated
+services anymore if both paths are present on the device. Instead the newer
+path will be preferred.
diff --git a/checks/fortigate_cpu b/checks/fortigate_cpu
index 5409495..23e403f 100644
--- a/checks/fortigate_cpu
+++ b/checks/fortigate_cpu
@@ -36,7 +36,8 @@ check_info["fortigate_cpu"] = {
"group" : "cpu_utilization",
# uses mib FORTINET-MIB-280
"snmp_scan_function" : lambda oid: ".1.3.6.1.4.1.12356.101.1" in oid(".1.3.6.1.2.1.1.2.0") and \
- oid(".1.3.6.1.4.1.12356.1.8.0"),
+ oid(".1.3.6.1.4.1.12356.1.8.0") and \
+ not oid(".1.3.6.1.4.1.12356.101.4.1.3.0"),
"snmp_info" : ( ".1.3.6.1.4.1.12356.1", [ 8 ]),
"includes" : [ "cpu_util.include", "fortigate_cpu.include" ],
}
diff --git a/checks/fortigate_sessions b/checks/fortigate_sessions
index 6526fb2..c1ff4d3 100644
--- a/checks/fortigate_sessions
+++ b/checks/fortigate_sessions
@@ -47,7 +47,8 @@ check_info["fortigate_sessions"] = {
"has_perfdata" : True,
# uses mib FORTINET-MIB-280
"snmp_scan_function" : lambda oid: ".1.3.6.1.4.1.12356.101.1" in oid(".1.3.6.1.2.1.1.2.0") and\
- oid(".1.3.6.1.4.1.12356.1.10.0"),
+ oid(".1.3.6.1.4.1.12356.1.10.0") and \
+ not oid(".1.3.6.1.4.1.12356.101.4.1.8.0"),
"snmp_info" : ( ".1.3.6.1.4.1.12356.1", [ 10 ]),
"includes" : ["fortigate_sessions.include"],
}
Module: check_mk
Branch: master
Commit: 8d921d20276451a655e937effc66d9767d3e643a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8d921d20276451…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 6 15:36:21 2018 +0100
wato module registering now supports sorting
changed the following other things:
* registering of new modules is now done using the new register_modules() function
* the modules are now represented by watomodule() instances instead of tuples
* the modules now have a new optional field: sort_index to define the
sort order. modules without explicit sort_index default to 100.
modules with equal sort_index will be sorted by their title.
* added missing "menus" to host- and servicegroup pages when no group defined yet
Change-Id: Id1dd3ef8b88635b0c18b0f83df73be2162c51c62
---
web/htdocs/wato.py | 128 +++++++++++++++++++++++++++---------
web/htdocs/watolib.py | 4 +-
web/plugins/sidebar/wato.py | 19 +++---
web/plugins/wato/background_job.py | 12 ++--
web/plugins/wato/bi.py | 11 +++-
web/plugins/wato/builtin_modules.py | 85 ++++++++++++------------
web/plugins/wato/mkeventd.py | 6 +-
7 files changed, 169 insertions(+), 96 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=8d921d2027…