Module: check_mk
Branch: master
Commit: 55ce7459e14f716bfba4887fb6afadf46830d351
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=55ce7459e14f71…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Oct 19 12:08:47 2015 +0200
#2436 NetApp monitoring: Now able to gather data for inventory
There are now inventory plugins which store various system infos
like <i>Backplane serial number</i>, <i>System Model</i>, <i>System Machine Type</i>
or the <i>Number of processors</i>.
The inventory data is only available for NetApp-7Mode right now.
The NetApp-Clustermode version is following soon.
---
.werks/2436 | 14 +++++++
ChangeLog | 3 ++
agents/special/agent_netapp | 8 ++++
checks/netapp_api_info | 23 +++++++-----
inventory/netapp_api_disks | 48 ++++++++++++++++++++++++
inventory/netapp_api_info | 86 +++++++++++++++++++++++++++++++++++++++++++
6 files changed, 173 insertions(+), 9 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=55ce7459e1…
Module: check_mk
Branch: master
Commit: 6c0dc8e81f92ab53da1571417add06bbd25d2eab
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6c0dc8e81f92ab…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 19 08:45:09 2015 +0200
#2682 FIX Fixed exception Error creating configuration: global name 'extra_host_attributes' is not defined
---
.werks/2682 | 10 ++++++++++
ChangeLog | 5 +++++
modules/check_mk.py | 12 ++++++++++++
3 files changed, 27 insertions(+)
diff --git a/.werks/2682 b/.werks/2682
new file mode 100644
index 0000000..6ee3614
--- /dev/null
+++ b/.werks/2682
@@ -0,0 +1,10 @@
+Title: Fixed exception Error creating configuration: global name 'extra_host_attributes' is not defined
+Level: 2
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1445237097
+
+
diff --git a/ChangeLog b/ChangeLog
index 56bf526..157be51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
1.2.7i4:
+ Core & Setup:
+ * 2682 FIX: Fixed exception Error creating configuration: global name 'extra_host_attributes' is not defined
+
Checks & Agents:
+ * 2434 NetApp monitoring: Cluster-Mode is now supported, changes in existing 7Mode checks...
+ NOTE: Please refer to the migration notes!
* 2695 hp_msa_disk, hp_msa_volume: these checks now report more information about disks and volumes of a HP MSA 2040 Storage System
* 2663 knuerr_rms_temp: switch to new generic temperature logic, allow e.g. lower levels...
NOTE: Please refer to the migration notes!
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 44d4ed3..2cd3041 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -773,6 +773,17 @@ def fallback_ip_for(hostname, family=None):
return "::"
+def extra_host_attributes(hostname):
+ attrs = {}
+ for key, conflist in extra_host_conf.items():
+ values = host_extra_conf(hostname, conflist)
+ if values:
+ if key[0] == "_":
+ key = key.upper()
+ attrs[key] = values[0]
+ return attrs
+
+
#.
# .--SNMP----------------------------------------------------------------.
# | ____ _ _ __ __ ____ |
@@ -1892,6 +1903,7 @@ def host_extra_conf_merged(hostname, conf):
rule_dict.setdefault(key, value)
return rule_dict
+
def in_binary_hostlist(hostname, conf):
# if we have just a list of strings just take it as list of hostnames
if conf and type(conf[0]) == str:
Module: check_mk
Branch: master
Commit: 42cec6806e924329c7dcf2cc782615515a3c4a2f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=42cec6806e9243…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Fri Oct 16 18:42:29 2015 +0200
Closed bug 2356
---
.bugs/2356 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.bugs/2356 b/.bugs/2356
index 13d1df3..b55234e 100644
--- a/.bugs/2356
+++ b/.bugs/2356
@@ -1,11 +1,14 @@
Title: Improvement for the views: Show timestamp instead of timeperiode
Component: multisite
-State: open
+Class: nastiness
+State: closed
Date: 2015-10-08 11:38:41
Targetversion: 1.2.7
-Class: nastiness
Multisite -> Views -> Other will show the last events from the monitoring. The view will
show the timeperiode since the event has occured. If the customers wants to search for
the reason of a problem, the timestamp would be more helpful instead of the timeperiode.
Show the timestamp in this views.
+
+2015-10-16 18:30:16: changed state open -> closed
+This feature is configurable with the display options.
Module: check_mk
Branch: master
Commit: 595e8a35b38f4ea1cbb9275c8324eee0882b9d58
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=595e8a35b38f4e…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Fri Oct 16 17:03:38 2015 +0200
#2661 FIX windows agent: fixed incomplete process list
in 1.2.7i3p0 and 1.2.7i3p1 the process list of the windows agent is cut off after a few entries
unless wmi is activated for that check.
---
.werks/2661 | 10 ++++++++++
ChangeLog | 3 +++
agents/windows/Makefile | 2 +-
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 830464 -> 830464 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 830464 -> 830464 bytes
agents/windows/check_mk_agent.cc | 3 ++-
agents/windows/check_mk_agent.exe | Bin 748032 -> 748032 bytes
agents/windows/check_mk_agent.msi | Bin 1836544 -> 1836544 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 748032 -> 748032 bytes
agents/windows/crash.exe | Bin 20024 -> 101058 bytes
agents/windows/install_agent-64.exe | Bin 379562 -> 383233 bytes
agents/windows/install_agent.exe | Bin 370503 -> 374175 bytes
agents/windows/nowin.exe | Bin 22511 -> 103194 bytes
14 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/.werks/2661 b/.werks/2661
new file mode 100644
index 0000000..c141258
--- /dev/null
+++ b/.werks/2661
@@ -0,0 +1,10 @@
+Title: windows agent: fixed incomplete process list
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1445007640
+Class: fix
+
+in 1.2.7i3p0 and 1.2.7i3p1 the process list of the windows agent is cut off after a few entries
+unless wmi is activated for that check.
diff --git a/ChangeLog b/ChangeLog
index 56bf526..e51b3ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,12 @@
1.2.7i4:
Checks & Agents:
+ * 2434 NetApp monitoring: Cluster-Mode is now supported, changes in existing 7Mode checks...
+ NOTE: Please refer to the migration notes!
* 2695 hp_msa_disk, hp_msa_volume: these checks now report more information about disks and volumes of a HP MSA 2040 Storage System
* 2663 knuerr_rms_temp: switch to new generic temperature logic, allow e.g. lower levels...
NOTE: Please refer to the migration notes!
* 2660 FIX: fixed windows agent using the wrong working directory...
+ * 2661 FIX: windows agent: fixed incomplete process list...
Multisite:
* 2680 FIX: LDAP: Fixed exception when syncing groups using configurations from previous versions...
diff --git a/agents/windows/Makefile b/agents/windows/Makefile
index 70b88ed..29f932a 100644
--- a/agents/windows/Makefile
+++ b/agents/windows/Makefile
@@ -122,7 +122,7 @@ check_mk_agent-64.exe.versioned:
%.exe: %.unversioned.exe %.exe.versioned
-
+
# -----------------------------------------------------------------------------
# NSIS installer will be removed and replaced by multiarch MSI installer
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 30ce115..6962904 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-559
+569
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 27960e7..adf3fe7 100755
Binary files a/agents/windows/check_mk_agent-64.exe and b/agents/windows/check_mk_agent-64.exe differ
diff --git a/agents/windows/check_mk_agent-64.unversioned.exe b/agents/windows/check_mk_agent-64.unversioned.exe
index 4ae052b..05d2887 100755
Binary files a/agents/windows/check_mk_agent-64.unversioned.exe and b/agents/windows/check_mk_agent-64.unversioned.exe differ
diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index fbf7c47..3e9ac26 100644
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -1509,6 +1509,7 @@ void section_ps(SOCKET &out)
if (hProcessSnap != INVALID_HANDLE_VALUE)
{
pe32.dwSize = sizeof(PROCESSENTRY32);
+
if (Process32First(hProcessSnap, &pe32))
{
do
@@ -1534,7 +1535,7 @@ void section_ps(SOCKET &out)
DWORD processHandleCount = 0;
// GetProcessHandleCount is only available winxp upwards
- typedef BOOL (*GetProcessHandleCount_type)(HANDLE, PDWORD);
+ typedef BOOL WINAPI (*GetProcessHandleCount_type)(HANDLE, PDWORD);
DYNAMIC_FUNC(GetProcessHandleCount, L"kernel32.dll");
if (GetProcessHandleCount_dyn != NULL) {
GetProcessHandleCount_dyn(hProcess, &processHandleCount);
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index b6be7e2..60e5b8d 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe differ
diff --git a/agents/windows/check_mk_agent.msi b/agents/windows/check_mk_agent.msi
index 64bc0f3..748ab3d 100755
Binary files a/agents/windows/check_mk_agent.msi and b/agents/windows/check_mk_agent.msi differ
diff --git a/agents/windows/check_mk_agent.unversioned.exe b/agents/windows/check_mk_agent.unversioned.exe
index aeb6a49..7e4ab5f 100755
Binary files a/agents/windows/check_mk_agent.unversioned.exe and b/agents/windows/check_mk_agent.unversioned.exe differ
diff --git a/agents/windows/crash.exe b/agents/windows/crash.exe
index 6527e43..d956227 100755
Binary files a/agents/windows/crash.exe and b/agents/windows/crash.exe differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index 2de1e5b..7076414 100755
Binary files a/agents/windows/install_agent-64.exe and b/agents/windows/install_agent-64.exe differ
diff --git a/agents/windows/install_agent.exe b/agents/windows/install_agent.exe
index 0006199..402b1c3 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe differ
diff --git a/agents/windows/nowin.exe b/agents/windows/nowin.exe
index bc419b6..6fa7286 100755
Binary files a/agents/windows/nowin.exe and b/agents/windows/nowin.exe differ
Module: check_mk
Branch: master
Commit: fc46323af3fafd834b2fc8c095152a7cc1cdebc6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fc46323af3fafd…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 16 16:40:20 2015 +0200
Further optimization of ps check for large number of processes
---
.werks/2664 | 2 +-
checks/ps.include | 50 +++++++++++++++++++++++++++++++++++++-------------
2 files changed, 38 insertions(+), 14 deletions(-)
diff --git a/.werks/2664 b/.werks/2664
index 6891d01..29cf879 100644
--- a/.werks/2664
+++ b/.werks/2664
@@ -7,4 +7,4 @@ Date: 1445002617
Class: fix
In one situation with about 7500 matching processes out of 8000 the check now saves
-about 15% of the CPU ressources.
+about 20% of the CPU ressources.
diff --git a/checks/ps.include b/checks/ps.include
index 89d180c..09e7b8c 100644
--- a/checks/ps.include
+++ b/checks/ps.include
@@ -86,7 +86,7 @@ def inventory_ps_common(invdata, invrules, info):
# First entry in line is the node name or None for non-clusters
ps = line[1:]
l_user = [userspec]
- matches = process_matches(ps, pattern, l_user)
+ matches = process_matches_for_discovery(ps, pattern, l_user)
if matches != False:
if len(matches) < num_perc_s:
raise MKGeneralException("Invalid entry in inventory_processes: service description '%s' contains "
@@ -153,17 +153,7 @@ def escape_regex_chars(match):
return r
-def process_matches(ps, procname, l_user):
- # procname is either:
- # 1. a string beginning with ~. Then it is interpreted as regular expression
- # that must match the *beginning* of the process line. Please check the output of
- # check_mk -d HOSTNAME. Note: groups of whitespaces are reduced to one single
- # whitespace!
- # 2. a string *not* beginning with ~: It must be equal to the first column
- # in the process table (i.e. the process name). No regular expressions are
- # applied. A simple string compare is done.
-
- # agent might output username in brackets in the first columns
+def process_matches_for_discovery(ps, procname, l_user):
userspec = l_user[0]
if ps[0].startswith("(") and ps[0].endswith(")") and len(ps) > 1:
addinfo = ps[0][1:-1].split(",")
@@ -194,6 +184,40 @@ def process_matches(ps, procname, l_user):
return False
+
+# Returns True or False
+def process_matches_for_check(process_line, process_pattern, user_pattern):
+
+ # Check process owner. Note: the first field with process information is
+ # optional and might be missing (old agents).
+ if process_line[0].startswith("(") and process_line[0].endswith(")") and len(process_line) > 1:
+ if user_pattern:
+ addinfo = process_line[0][1:-1].split(",")
+ user = addinfo[0]
+ if user_pattern and user_pattern.startswith('~'):
+ if not regex(user_pattern[1:]).match(user):
+ return False
+
+ elif user_pattern and user_pattern != user:
+ return False
+
+ process_line = process_line[1:]
+
+ # Process name not relevant
+ if not process_pattern:
+ return True
+
+ # Regex for complete process command line
+ elif process_pattern.startswith("~"):
+ reg = regex(process_pattern[1:]) # skip "~"
+ return reg.match(" ".join(process_line))
+
+ # Exact match on name of executable
+ else:
+ return process_line[0] == process_pattern
+
+
+
# produce text or html output intended for the long output field of a check from details about a
# process.
# the input is expected to be a list (one per process) of lists (one per data field) of key-value
@@ -322,7 +346,7 @@ def check_ps_common(item, params, info, cpu_cores = 1, info_name = "processes",
for line in info:
node_name = line[0]
ps = line[1:]
- if process_matches(ps, params.get("process"), [params.get("user")]) != False:
+ if process_matches_for_check(ps, params.get("process"), params.get("user")):
process = []
count += 1
if node_name != None:
Module: check_mk
Branch: master
Commit: 4f4912bbf98265b3eafa00ec18c2644c8b3faf9c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4f4912bbf98265…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Fri Oct 16 16:20:57 2015 +0200
Updated bug entries
---
.bugs/2233 | 4 ++--
.bugs/2353 | 11 ++++++-----
.bugs/2354 | 8 ++++----
.bugs/595 | 6 +++---
4 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/.bugs/2233 b/.bugs/2233
index 02a05c9..9f20fb0 100644
--- a/.bugs/2233
+++ b/.bugs/2233
@@ -1,4 +1,4 @@
-Title: Simulation Mode in Multisite anzeigen
+Title: Simulation Mode should be displayed in multisite
Component: multisite
State: open
Date: 2014-12-16 13:28:41
@@ -6,4 +6,4 @@ Targetversion: future
Class: nastiness
when a site is in simulation mode, this should be clearly noted in the
-multisite gui
+multisite.
diff --git a/.bugs/2353 b/.bugs/2353
index 4d6d4f1..f9b095c 100644
--- a/.bugs/2353
+++ b/.bugs/2353
@@ -1,12 +1,13 @@
-Title: Discovery Anzeige der Check Parameter
+Title: Error messages from discovery output of check parameters
Component: wato
State: open
Date: 2015-09-11 21:21:42
Targetversion: 1.2.7
Class: bug
-Bei einer Discovery und der Anzeige der Check Parameter erscheinen bei vielen Services folgende Meldungen bzw.
-ähnliche Meldungen:
+If you perform a discovery and display the check parameters of the checks,
+there will be displayed several messages with invalid check parameters.
+This or similar messages will be showed:
85 is int but float is required
-Hier sind die Regeln oder die Auswertung dieser fehlerhaft und führen zu solchen Anzeigen.
-Aufgefallen bei APC Geräten.
\ No newline at end of file
+
+Noticed on APC devices.
diff --git a/.bugs/2354 b/.bugs/2354
index f07206e..2f61e31 100644
--- a/.bugs/2354
+++ b/.bugs/2354
@@ -1,10 +1,10 @@
-Title: Automatische Anmeldung nach Seitenkopie
+Title: Automatic login after site copy
Component: multisite
State: open
Date: 2015-09-11 21:28:12
Targetversion: 1.2.7
Class: nastiness
-Wird eine Seite mit omd cp kopiert und man hat sich bei einer Seite angemeldet,
-dann muss man sich an der Kopie nicht mehr anmelden. Es werden wohl die gleichen
-Daten fuer die Prüfung genommen. Der Cookie sollte aber nur bei einer Seite passen.
\ No newline at end of file
+If you copy one site with omd cp and open the login page of one of the sites,
+you are logged in automatically. No authentication is needed. The login is
+duplicated and can be used for both sites.
diff --git a/.bugs/595 b/.bugs/595
index dadb30d..6d40393 100644
--- a/.bugs/595
+++ b/.bugs/595
@@ -1,9 +1,9 @@
-Title: Wato Replikation Transaktionssicher machen
+Title: WATO replication is not transaction safe
Component: multisite
State: open
Date: 2012-01-13 11:05:09
Targetversion: 1.2.0
Class: todo
-Repliziert User A in Wato änderungen und User B produziert gleichzeitig neue,
-verhält sich die Replizierung falsch.
+If user A makes a change in WATO and simultaneously user b will change settings,
+the changes are not accepted from both users. There is missing a transaction condition.
Module: check_mk
Branch: master
Commit: ab5aaa7dde6e53b614f7e02128dfc9dda24f6216
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ab5aaa7dde6e53…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 16 15:38:00 2015 +0200
#2664 FIX ps: Speedup in situation with many matching processes
In one situation with about 7500 matching processes out of 8000 the check now saves
about 15% of the CPU ressources.
---
.werks/2664 | 10 ++++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 27 +++++++++++++++++++--------
3 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/.werks/2664 b/.werks/2664
new file mode 100644
index 0000000..6891d01
--- /dev/null
+++ b/.werks/2664
@@ -0,0 +1,10 @@
+Title: ps: Speedup in situation with many matching processes
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1445002617
+Class: fix
+
+In one situation with about 7500 matching processes out of 8000 the check now saves
+about 15% of the CPU ressources.
diff --git a/ChangeLog b/ChangeLog
index 2e68c85..4c61766 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
* 2663 knuerr_rms_temp: switch to new generic temperature logic, allow e.g. lower levels...
NOTE: Please refer to the migration notes!
* 2660 FIX: fixed windows agent using the wrong working directory...
+ * 2664 FIX: ps: Speedup in situation with many matching processes...
Multisite:
* 2680 FIX: LDAP: Fixed exception when syncing groups using configurations from previous versions...
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 32073af..0c1cc0a 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1093,17 +1093,28 @@ def last_counter_wrap():
-# Deletes counters from g_item_state matching the given pattern and are older_than x seconds.
-# This is a neccessary cleanup just used by ps.include. Not nice.
-def clear_counters(check_type_prefix, older_than):
+# Makes sure, that no counter with a give prefix is kept longer
+# than min_keep_seconds * 2. Counter is kept at least min_keep_seconds.
+def clear_counters(counter_name_prefix, min_keep_seconds):
global g_item_state
+
+ cleared_key = "last.cleared." + counter_name_prefix
+ if cleared_key in g_item_state:
+ last_cleared, none = g_item_state[cleared_key]
+ if last_cleared + min_keep_seconds > time.time():
+ return # recent enough
+ g_item_state[cleared_key] = (time.time(), None)
+
counters_to_delete = []
- now = time.time()
+ remove_if_min_keep_seconds = time.time() - min_keep_seconds
- for name, (timestamp, value) in g_item_state.items():
- joined_name = type(name) == tuple and name[0] or name
- if joined_name.startswith(check_type_prefix):
- if now > timestamp + older_than:
+ for name, (timestamp, value) in g_item_state.iteritems():
+ if type(name) == tuple:
+ counter_name = name[0] # never needed, since only called by ps currently
+ else:
+ counter_name = name
+ if counter_name.startswith(counter_name_prefix):
+ if timestamp < remove_if_min_keep_seconds:
counters_to_delete.append(name)
for name in counters_to_delete: