Module: check_mk
Branch: master
Commit: 0f607efdb209ac15f3729a007e0674cee270a421
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0f607efdb209ac…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Sep 12 16:06:05 2014 +0200
#1111 vCenter monitoring: greatly improved performance (at least 40 times faster)
The pysphere API is no longer used when monitoring ESX vCenter systems.
We are now using much simpler tools to evaluate the vCenter response instead,
thus saving quite a lot of cpu time. Depending on the number of ESX Hosts and
virtualmachines you will see a performance increase by a factor of 40-200.
<br><br>
Note:<br>
If the "Compatibility mode" is set in WATO the old "pysphere" version is still being used.
This option remains for older (<5.0) ESX versions.
---
.werks/1111 | 17 +
ChangeLog | 1 +
agents/special/agent_vsphere | 698 +++++++++++++++++++++++++++++-------------
3 files changed, 509 insertions(+), 207 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=0f607efdb2…
Module: check_mk
Branch: master
Commit: a14f10f33b004fa9fd991af0fd2b02f597f52f28
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a14f10f33b004f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Sep 12 15:36:29 2014 +0200
winperf_phydisk: fix UNKNOWN, make compatible again with diskstat.include
---
checks/winperf_phydisk | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/checks/winperf_phydisk b/checks/winperf_phydisk
index b32a3cd..7c267bd 100644
--- a/checks/winperf_phydisk
+++ b/checks/winperf_phydisk
@@ -63,36 +63,39 @@
check_includes['winperf_phydisk'] = [ "diskstat.include" ]
def winperf_phydisk_convert(info):
+ # node_info has been activated. This check simply ignores this
+ # for now.
# In case disk performance counters are not enabled, the agent sends
# an almost empty section, where the second line is missing completely
if len(info) == 1:
return []
- disks = [ d.split('_')[-1] for d in info[1][2:-1] ]
+ disks = [ d.split('_')[-1] for d in info[1][3:-1] ]
for line in info[2:]:
- if line[0] == '-14':
- disk_read_bytes = [ int(x) / 512 for x in line[1:-2] ]
- elif line[0] == '-12':
- disk_write_bytes = [ int(x) / 512 for x in line[1:-2] ]
- elif line[0] == '-20':
- disk_reads = [ int(x) for x in line[1:-2] ]
- elif line[0] == '-18':
- disk_writes = [ int(x) for x in line[1:-2] ]
- elif line[0] == '1168': # Average Disk Read Queue Length
- disk_readq_ctrs = [ int(x) for x in line[1:-2] ]
- elif line[0] == '1170': # Average Disk Read Queue Length
- disk_writeq_ctrs = [ int(x) for x in line[1:-2] ]
+ if line[1] == '-14':
+ disk_read_bytes = [ int(x) / 512 for x in line[2:-2] ]
+ elif line[1] == '-12':
+ disk_write_bytes = [ int(x) / 512 for x in line[2:-2] ]
+ elif line[1] == '-20':
+ disk_reads = [ int(x) for x in line[2:-2] ]
+ elif line[1] == '-18':
+ disk_writes = [ int(x) for x in line[2:-2] ]
+ elif line[1] == '1168': # Average Disk Read Queue Length
+ disk_readq_ctrs = [ int(x) for x in line[2:-2] ]
+ elif line[1] == '1170': # Average Disk Read Queue Length
+ disk_writeq_ctrs = [ int(x) for x in line[2:-2] ]
# Missing columns are donted by negative values (Linux sends here latency
# information)
empty = [ -1 for x in disks ]
+ none = [ None for x in disks ] # Used as dummy node info
- return zip(disks, disk_read_bytes, disk_write_bytes, disk_reads, disk_writes, empty, disk_readq_ctrs, disk_writeq_ctrs)
+ return zip(none, disks, disk_read_bytes, disk_write_bytes, disk_reads, disk_writes, empty, disk_readq_ctrs, disk_writeq_ctrs)
def inventory_winperf_phydisk(info):
return inventory_diskstat_generic(winperf_phydisk_convert(info))
def check_winperf_phydisk(item, params, info):
- this_time = int(float(info[0][0]))
+ this_time = int(time.time())
return check_diskstat_generic(item, params, this_time, winperf_phydisk_convert(info))
@@ -100,6 +103,7 @@ check_info["winperf_phydisk"] = {
'check_function': check_winperf_phydisk,
'inventory_function': inventory_winperf_phydisk,
'service_description': 'Disk IO %s',
+ 'node_info': True,
'has_perfdata': True,
'group': 'disk_io',
}
Module: check_mk
Branch: master
Commit: 6a9d4ebbaae0cc7d2ae3eadbe74616e99d8d8c4a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6a9d4ebbaae0cc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Sep 12 14:18:19 2014 +0200
Added script for makeing a statistics of used check plugins
---
doc/treasures/cmk-plugin-statistics | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/doc/treasures/cmk-plugin-statistics b/doc/treasures/cmk-plugin-statistics
new file mode 100755
index 0000000..ee2171b
--- /dev/null
+++ b/doc/treasures/cmk-plugin-statistics
@@ -0,0 +1,20 @@
+#!/bin/bash
+# This script makes a statistics of the usage of the various check plugins.
+# It makes a Livestatus-Connection and outputs a list of plugins and the
+# information on how many different hosts this plugin is being used.
+
+if [ "$OMD_ROOT" ] ; then
+ LIVE_SOCKET=$OMD_ROOT/tmp/run/live
+elif [ -z "$LIVE_SOCKET" ] ; then
+ echo "Please do an 'export LIVE_SOCKET=/path/to/your/livestatus/socket'" >&2
+ echo "and then call me again." >&2
+ exit 1
+fi
+
+echo -e "GET services\nColumns: host_name check_command" \
+ | unixcat "$LIVE_SOCKET" \
+ | sort -u \
+ | cut -d\; -f2 \
+ | sort \
+ | uniq -c \
+ | sort -rn
Module: check_mk
Branch: master
Commit: 0c2d6c3ec331fa112f405290febe4b8fe794b748
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0c2d6c3ec331fa…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Sep 12 15:22:15 2014 +0200
#1399 FIX Fix left-over tac processes when showing Event Console history
When you show the Event Console history and run into a soft or hard
query limit (of usually 1,000 or 5,000 entries), then every time one
<tt>tac</tt> process was left over. This has been fixed.
---
.werks/1399 | 12 ++++++++++++
ChangeLog | 1 +
mkeventd/bin/mkeventd | 9 ++++-----
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/.werks/1399 b/.werks/1399
new file mode 100644
index 0000000..0a2f0ee
--- /dev/null
+++ b/.werks/1399
@@ -0,0 +1,12 @@
+Title: Fix left-over tac processes when showing Event Console history
+Level: 2
+Component: ec
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i6
+Date: 1410528075
+
+When you show the Event Console history and run into a soft or hard
+query limit (of usually 1,000 or 5,000 entries), then every time one
+<tt>tac</tt> process was left over. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 452c646..b13a75c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -123,6 +123,7 @@
* 1148 Allow execution of actions when cancelling events...
* 1395 Event Console can now create notifications via Check_MK RBN...
* 1007 FIX: check_mkevents: fix case where events contain binary zeroes
+ * 1399 FIX: Fix left-over tac processes when showing Event Console history...
HW/SW-Inventory:
* 0643 windows inventory: OS now contains the install date, reg_uninstall now contains the path...
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 122f8a5..ee18dc5 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -577,14 +577,13 @@ def parse_history_file(path, headers, filters, greptexts, limit):
cmd = 'tac "%s"' % path
if greptexts:
cmd += ' | grep -i -e %s' % ".*".join(greptexts)
- grep = subprocess.Popen(cmd, shell = True, close_fds=True, stdout=subprocess.PIPE)
- logfile = grep.stdout
+ grep = subprocess.Popen(cmd, shell=True, close_fds=True, stdout=subprocess.PIPE)
- for line in logfile:
+ for line in grep.stdout:
line_no += 1
if limit != None and len(entries) > limit:
- if greptexts:
- os.kill(grep.pid, 15)
+ grep.kill()
+ grep.wait()
break
try: