Module: check_mk
Branch: master
Commit: 5b0864b7b9148785e4812bc474980c6708904b3c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5b0864b7b91487…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 2 12:37:55 2015 +0100
Rename SNMP timeout parameter
---
web/plugins/wato/check_mk_configuration.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index e2cdd83..a506042 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -2020,7 +2020,7 @@ register_rule(group,
elements = [
( "timeout",
Float(
- title = _("Timeout between retries"),
+ title = _("Response timeout for a single query"),
help = _("After a request is sent to the remote SNMP agent we will wait up to this "
"number of seconds until assuming the answer get lost and retrying."),
default_value = 1,
Module: check_mk
Branch: master
Commit: 879c2e26a23373b8308c6b3330dab0a6d430c188
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=879c2e26a23373…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 2 11:51:55 2015 +0100
#2873 FIX megaraid_pdisks: handle case "Copyback" correctly
This state seems to happen while a spare disk has taken over and
is filled with data in order to recreate redundancy. Thanks to
Mark Cooney.
---
.werks/2873 | 12 ++++++++++++
ChangeLog | 1 +
checks/megaraid_pdisks | 1 +
3 files changed, 14 insertions(+)
diff --git a/.werks/2873 b/.werks/2873
new file mode 100644
index 0000000..ea0c4a4
--- /dev/null
+++ b/.werks/2873
@@ -0,0 +1,12 @@
+Title: megaraid_pdisks: handle case "Copyback" correctly
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1449053442
+
+This state seems to happen while a spare disk has taken over and
+is filled with data in order to recreate redundancy. Thanks to
+Mark Cooney.
diff --git a/ChangeLog b/ChangeLog
index ea9b43f..9e291de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -116,6 +116,7 @@
* 2782 FIX: cups_queues: fix crash in case user name contains spaces
* 2849 FIX: winperf_processor.util: Fixed crash in case no CPU infos are sent
* 2850 FIX: juniper_cpu: Better error handling of empty data reported by device
+ * 2873 FIX: megaraid_pdisks: handle case "Copyback" correctly...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/megaraid_pdisks b/checks/megaraid_pdisks
index ce47a01..18c57cd 100644
--- a/checks/megaraid_pdisks
+++ b/checks/megaraid_pdisks
@@ -110,6 +110,7 @@ megaraid_pdisks_states = {
'JBOD' : 0,
'Failed' : 2,
'Unconfigured(bad)' : 1,
+ 'Copyback' : 1,
}
def check_megaraid_pdisks(item, _no_params, info):
Module: check_mk
Branch: master
Commit: 06c8a634d67aae884146c863ff09a5ec85de1f96
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=06c8a634d67aae…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 2 11:16:50 2015 +0100
Conflicts:
ChangeLog
checks/winperf_processor
---
.werks/2849 | 10 ++++++++++
ChangeLog | 1 +
checks/winperf_processor | 13 ++++++++++---
3 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/.werks/2849 b/.werks/2849
new file mode 100644
index 0000000..4eaae74
--- /dev/null
+++ b/.werks/2849
@@ -0,0 +1,10 @@
+Title: winperf_processor.util: Fixed crash in case no CPU infos are sent
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1449051266
+
+
diff --git a/ChangeLog b/ChangeLog
index 42ee294..c425e9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -114,6 +114,7 @@
* 2744 FIX: waitmax now kills the whole process group and is a bit more robust.
* 2842 FIX: jolokia_metrics.perm_gen: fixed wrong calculation of perf variables warn and crit
* 2782 FIX: cups_queues: fix crash in case user name contains spaces
+ * 2849 FIX: winperf_processor.util: Fixed crash in case no CPU infos are sent
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/winperf_processor b/checks/winperf_processor
index 21345a8..75152e4 100644
--- a/checks/winperf_processor
+++ b/checks/winperf_processor
@@ -35,14 +35,13 @@ def inventory_winperf_util(info):
try:
if line[0] == '-232':
return [(None, "winperf_cpu_default_levels")]
- except:
+ except IndexError:
pass
# params: levels for warn / crit in percentage
def check_winperf_util(_no_item, params, info):
if not info:
- yield 3, "Got no information from agent"
return
this_time = int(float(info[0][0]))
@@ -51,9 +50,17 @@ def check_winperf_util(_no_item, params, info):
"-96": "user",
"-94": "privileged"}
+ winperf_lines = []
+ for line in info[1:]:
+ if line[0] in what_map:
+ winperf_lines.append(line)
+
+ if not winperf_lines:
+ return
+
wrapped = False
- for line in info[1:]:
+ for line in winperf_lines:
if line[0] in what_map:
what = what_map[line[0]]
# Windows sends one counter for each CPU plus one counter that
Module: check_mk
Branch: master
Commit: 2e002a4e6bafffdb4391ba06e8c762e144b12dc2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2e002a4e6bafff…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 2 10:32:57 2015 +0100
#2781 FIX Fix role handling of "Custom Links" snapin in case of adapted roles
If you have defined you own roles then a user had not correctly been mapped
to <tt>user</tt>, <tt>guest</tt> or <tt>admin</tt> when selecting the right
portions of the custom links in the snapin. This has been fixed. Thanks to
Molchanov Alexander.
---
.werks/2781 | 13 +++++++++++++
ChangeLog | 1 +
web/htdocs/config.py | 4 ++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/2781 b/.werks/2781
new file mode 100644
index 0000000..190d137
--- /dev/null
+++ b/.werks/2781
@@ -0,0 +1,13 @@
+Title: Fix role handling of "Custom Links" snapin in case of adapted roles
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1449048678
+
+If you have defined you own roles then a user had not correctly been mapped
+to <tt>user</tt>, <tt>guest</tt> or <tt>admin</tt> when selecting the right
+portions of the custom links in the snapin. This has been fixed. Thanks to
+Molchanov Alexander.
diff --git a/ChangeLog b/ChangeLog
index 8e1cba7..161e4c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -139,6 +139,7 @@
* 2772 FIX: Fixed possible exception in icon column when showing some actions in the column...
* 2846 FIX: View refresh could reset checkboxes on views where "always show checkboxes" is enabled
* 2778 FIX: Fixed correct scaling of sidebar on newer versions of Chrome browser
+ * 2781 FIX: Fix role handling of "Custom Links" snapin in case of adapted roles...
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index 3a399d1..030b2fd 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -243,9 +243,9 @@ def login(u):
# Get best base roles and use as "the" role of the user
global user_baserole_id
- if "admin" in user_role_ids:
+ if "admin" in user_baserole_ids:
user_baserole_id = "admin"
- elif "user" in user_role_ids:
+ elif "user" in user_baserole_ids:
user_baserole_id = "user"
else:
user_baserole_id = "guest"
Module: check_mk
Branch: master
Commit: 2b3acd7bca68a47c050cc5d2b4fc58aa8b01d743
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2b3acd7bca68a4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 2 10:10:54 2015 +0100
The autocheck entries of clustered services were stored in
[cluster].mk autocheck files in past versions. Current versions
are now storing the autochecks in the node specific files.
The old [cluster].mk files were not cleaned up during discovery
leading into duplicate autochecks entries. As these files were
never updated again, they could result in unwanted services on
the cluster hosts. This could be fixed manually by removing the
[cluster].mk autocheck files via command line.
The current version is now cleaning up the files during discovery.
Conflicts:
ChangeLog
modules/automation.py
---
.werks/2848 | 20 +++++++++++++++++++
ChangeLog | 1 +
modules/discovery.py | 54 +++++++++++++++++++++++++++++++++-----------------
3 files changed, 57 insertions(+), 18 deletions(-)
diff --git a/.werks/2848 b/.werks/2848
new file mode 100644
index 0000000..3b993fb
--- /dev/null
+++ b/.werks/2848
@@ -0,0 +1,20 @@
+Title: Fixed cleanup of old autocheck files of cluster hosts
+Level: 1
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1449047196
+
+The autocheck entries of clustered services were stored in
+[cluster].mk autocheck files in past versions. Current versions
+are now storing the autochecks in the node specific files.
+
+The old [cluster].mk files were not cleaned up during discovery
+leading into duplicate autochecks entries. As these files were
+never updated again, they could result in unwanted services on
+the cluster hosts. This could be fixed manually by removing the
+[cluster].mk autocheck files via command line.
+
+The current version is now cleaning up the files during discovery.
diff --git a/ChangeLog b/ChangeLog
index 234846e..8e1cba7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
* 2759 FIX: Allowing Emails to contain special characters like umlauts...
* 2764 FIX: Fixed broken SNMP checks in case SNMP check interval is configured for clusters...
* 2770 FIX: Check_MK is now warning the user about deprecated but configured checkgroup parameters...
+ * 2848 FIX: Fixed cleanup of old autocheck files of cluster hosts...
Checks & Agents:
* 2434 NetApp monitoring: Cluster-Mode is now supported, changes in existing 7Mode checks...
diff --git a/modules/discovery.py b/modules/discovery.py
index 2e281f3..a5b729d 100644
--- a/modules/discovery.py
+++ b/modules/discovery.py
@@ -52,9 +52,11 @@ def do_discovery(hostnames, check_types, only_new):
# cannot be discovered but the user is allowed to specify
# them and we do discovery on the nodes instead.
nodes = []
+ cluster_hosts = []
for h in hostnames:
nodes = nodes_of(h)
if nodes:
+ cluster_hosts.append(h)
hostnames += nodes
# Then remove clusters and make list unique
@@ -78,6 +80,11 @@ def do_discovery(hostnames, check_types, only_new):
cleanup_globals()
+ # Check whether or not the cluster host autocheck files are still
+ # existant. Remove them. The autochecks are only stored in the nodes
+ # autochecks files these days.
+ for hostname in cluster_hosts:
+ remove_autochecks_file(hostname)
def do_discovery_for(hostname, check_types, only_new, use_caches, on_error):
# Usually we disable SNMP scan if cmk -I is used without a list of
@@ -1203,6 +1210,15 @@ def has_autochecks(hostname):
return os.path.exists(autochecksdir + "/" + hostname + ".mk")
+def remove_autochecks_file(hostname):
+ filepath = autochecksdir + "/" + hostname + ".mk"
+ try:
+ os.remove(filepath)
+ except OSError:
+ pass
+
+
+# FIXME TODO: Consolidate with automation.py automation_write_autochecks_file()
def save_autochecks_file(hostname, items):
if not os.path.exists(autochecksdir):
os.makedirs(autochecksdir)
@@ -1231,6 +1247,11 @@ def set_autochecks_of(hostname, new_items):
new_autochecks.append((check_type, item, paramstring))
# write new autochecks file for that host
save_autochecks_file(node, new_autochecks)
+
+ # Check whether or not the cluster host autocheck files are still
+ # existant. Remove them. The autochecks are only stored in the nodes
+ # autochecks files these days.
+ remove_autochecks_file(hostname)
else:
existing = parse_autochecks_file(hostname)
# write new autochecks file, but take paramstrings from existing ones
@@ -1254,25 +1275,22 @@ def remove_autochecks_of(hostname):
nodes = nodes_of(hostname)
if nodes:
for node in nodes:
- old_items = parse_autochecks_file(node)
- new_items = []
- for check_type, item, paramstring in old_items:
- descr = service_description(check_type, item)
- if hostname != host_of_clustered_service(node, descr):
- new_items.append((check_type, item, paramstring))
- else:
- removed += 1
- save_autochecks_file(node, new_items)
+ removed += remove_autochecks_of_host(node)
else:
- old_items = parse_autochecks_file(hostname)
- new_items = []
- for check_type, item, paramstring in old_items:
- descr = service_description(check_type, item)
- if hostname != host_of_clustered_service(hostname, descr):
- new_items.append((check_type, item, paramstring))
- else:
- removed += 1
- save_autochecks_file(hostname, new_items)
+ removed += remove_autochecks_of_host(hostname)
return removed
+
+def remove_autochecks_of_host(hostname):
+ old_items = parse_autochecks_file(hostname)
+ removed = 0
+ new_items = []
+ for check_type, item, paramstring in old_items:
+ descr = service_description(check_type, item)
+ if hostname != host_of_clustered_service(hostname, descr):
+ new_items.append((check_type, item, paramstring))
+ else:
+ removed += 1
+ save_autochecks_file(hostname, new_items)
+ return removed