Module: check_mk
Branch: master
Commit: 4e34ece9f3a3f2532ba38fb1a15cbb43e4e22c09
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4e34ece9f3a3f2…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Jan 31 11:31:47 2018 +0100
5668 FIX Fixed potential segfault when talking to the event console
When users with restricted permissions tried to retrieve the event console
events or their history, a segfault could happen in the Livestatus NEB/Micro
Core. This has been fixed.
Change-Id: I16cccdf75316399a78a533f360a8241ecb433441
---
.werks/5668 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.werks/5668 b/.werks/5668
new file mode 100644
index 0000000..4c1c455
--- /dev/null
+++ b/.werks/5668
@@ -0,0 +1,12 @@
+Title: Fixed potential segfault when talking to the event console
+Level: 1
+Component: livestatus
+Compatible: compat
+Edition: cre
+Version: 1.5.0i3
+Date: 1517394549
+Class: fix
+
+When users with restricted permissions tried to retrieve the event console
+events or their history, a segfault could happen in the Livestatus NEB/Micro
+Core. This has been fixed.
Module: check_mk
Branch: master
Commit: d5961c044c31425551be32023f1822ce51f36ff1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d5961c044c3142…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Wed Jan 31 10:42:04 2018 +0100
Update text for werk 5270
Change-Id: I394ba970d25edf43630821c470a3f53eafd74b05
---
.werks/5270 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.werks/5270 b/.werks/5270
index 92f52ec..32d4f14 100644
--- a/.werks/5270
+++ b/.werks/5270
@@ -1,4 +1,4 @@
-Title: Improved Agent Updater Check behaviour
+Title: Improved Agent Updater Check behaviour for Linux Hosts
Level: 1
Component: agents
Compatible: compat
@@ -7,6 +7,8 @@ Version: 1.5.0i3
Date: 1516085347
Class: feature
+This werk only applies to the Linux Agent.
+
Formerly, the Agent Updater Check did not update immediately after a manual action on the host. This could lead to some confusion.
Notably, you had to wait for the next update cycle to have a successful Agent registration displayed within the Check.
@@ -20,4 +22,4 @@ In order to mitigate this situation, the Agent Updater now:
The latter action is not performed in --debug option mode.
-Information about the cachefile updates will be displayed in -vv mode
\ No newline at end of file
+Information about the cachefile updates will be displayed in -vv mode
Module: check_mk
Branch: master
Commit: ebf272809bdcdfee664decd2ca1198e6f228d237
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ebf272809bdcdf…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Oct 26 11:09:21 2017 +0200
5438 diskstat: Discovers a sort of diskless partitions which can be found on XEN virtual setups
Change-Id: I193379fb8d42b46e0bf127f9f601b6e23dad75d2
---
.werks/5438 | 10 ++++++++++
agents/check_mk_agent.linux | 2 +-
checks/diskstat | 18 +++++++++++++++++-
checks/diskstat.include | 35 ++++++++++++++++++++---------------
web/plugins/wato/check_parameters.py | 1 +
5 files changed, 49 insertions(+), 17 deletions(-)
diff --git a/.werks/5438 b/.werks/5438
new file mode 100644
index 0000000..e716562
--- /dev/null
+++ b/.werks/5438
@@ -0,0 +1,10 @@
+Title: diskstat: Discovers a sort of diskless partitions which can be found on XEN virtual setups
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1509008915
+Class: feature
+
+
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index f857fc1..0a94bdc 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -440,7 +440,7 @@ fi
# Performancecounter Platten
echo '<<<diskstat>>>'
date +%s
-egrep ' (x?[shv]d[a-z]*|cciss/c[0-9]+d[0-9]+|emcpower[a-z]+|dm-[0-9]+|VxVM.*|mmcblk.*|dasd[a-z]*|bcache[0-9]+|nvme[0-9]+n[0-9]+) ' < /proc/diskstats
+egrep ' (x?[shv]d[a-z]*[0-9]*|cciss/c[0-9]+d[0-9]+|emcpower[a-z]+|dm-[0-9]+|VxVM.*|mmcblk.*|dasd[a-z]*|bcache[0-9]+|nvme[0-9]+n[0-9]+) ' < /proc/diskstats
if type dmsetup >/dev/null ; then
echo '[dmsetup_info]'
dmsetup info -c --noheadings --separator ' ' -o name,devno,vg_name,lv_name
diff --git a/checks/diskstat b/checks/diskstat
index 175398a..b2edbe7 100644
--- a/checks/diskstat
+++ b/checks/diskstat
@@ -100,17 +100,32 @@
#
# Returns a pair of the timestamp and that dictionary
# parsed = timestamp, disks
+
+
+diskstat_diskless_pattern = re.compile("x?[shv]d[a-z]*[0-9]+")
+
+
def parse_diskstat(info):
timestamp_str, proc_diskstat, name_info = diskstat_extract_name_info(info)
timestamp = int(timestamp_str)
- disks = {}
+ # Here we discover real partitions and exclude them:
+ # Sort of partitions with disks - typical in XEN virtual setups.
+ # Eg. there are xvda1, xvda2, but no xvda...
+ device_names = [line[3] for line in proc_diskstat]
+ real_partitions = {device_name for device_name in device_names
+ if diskstat_diskless_pattern.match(device_name)
+ and re.sub('[0-9]+$', '', device_name)}
+ disks = {}
for node_name, major, minor, device, \
read_ios, read_merges, read_sectors, read_ticks, \
write_ios, write_merges, write_sectors, write_ticks, \
ios_in_prog, total_ticks, rq_ticks in proc_diskstat:
+ if device in real_partitions:
+ continue
+
if (node_name, int(major), int(minor)) in name_info:
device = name_info[(node_name, int(major), int(minor))]
@@ -259,6 +274,7 @@ def diskstat_extract_name_info(info):
for line in info:
if node == None:
node = line[0]
+
if line[1] == '[dmsetup_info]':
phase = 'dmsetup_info'
elif line[1] == '[vx_dsk]':
diff --git a/checks/diskstat.include b/checks/diskstat.include
index b5d7469..619b13d 100644
--- a/checks/diskstat.include
+++ b/checks/diskstat.include
@@ -43,9 +43,9 @@ diskstat_inventory = []
# ( [ 'summary', 'physical', 'lvm', 'vxvm' ], ALL_HOSTS ),
# ]
-def inventory_diskstat_generic(info):
+def inventory_diskstat_generic(parsed):
# Skip over on empty data
- if not info:
+ if not parsed:
return
# New style: use rule based configuration, defaulting to summary mode
@@ -70,23 +70,28 @@ def inventory_diskstat_generic(info):
if "legacy" in modes:
inventory += [ ( "read", None ), ( "write", None ) ]
- if "physical" in modes:
- inventory += [ (line[1], "diskstat_default_levels")
- for line in info
- if not ' ' in line[1] ]
+ for line in parsed:
+ name = line[1]
+ if "physical" in modes and \
+ not ' ' in name and \
+ not diskstat_diskless_pattern.match(name):
+ inventory.append((name, "diskstat_default_levels"))
- if "lvm" in modes:
- inventory += [ (line[1], "diskstat_default_levels")
- for line in info
- if line[1].startswith("LVM ") ]
+ if "lvm" in modes and \
+ name.startswith("LVM "):
+ inventory.append((name, "diskstat_default_levels"))
- if "vxvm" in modes:
- inventory += [ (line[1], "diskstat_default_levels")
- for line in info
- if line[1].startswith("VxVM ") ]
+ if "vxvm" in modes and \
+ name.startswith("VxVM "):
+ inventory.append((name, "diskstat_default_levels"))
- return inventory
+ if "diskless" in modes and \
+ diskstat_diskless_pattern.match(name):
+ # Sort of partitions with disks - typical in XEN virtual setups.
+ # Eg. there are xvda1, xvda2, but no xvda...
+ inventory.append((name, "diskstat_default_levels"))
+ return inventory
def check_diskstat_line(this_time, item, params, line, mode='sectors'):
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index df192cf..c346835 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -11752,6 +11752,7 @@ register_rule(
( "physical", _("Create a separate check for each physical disk") ),
( "lvm", _("Create a separate check for each LVM volume (Linux)") ),
( "vxvm", _("Creata a separate check for each VxVM volume (Linux)") ),
+ ( "diskless", _("Creata a separate check for each partition (XEN)") ),
],
default_value = [ 'summary' ],
),
Module: check_mk
Branch: master
Commit: 716ed478948957c8642b0bafc66fcf02dd4f6a1c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=716ed478948957…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 30 13:31:34 2018 +0100
5663 FIX Fixed adding graphs to graph collections
Graphs could not be added to graph collections in all 1.5 releases anymore.
This made the graph collections not appear in the sidebar, since empty collections
are not shown there.
Change-Id: Icd4393b72e6fcb700eb3ff8cb7a64c9966d86496
---
.werks/5663 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.werks/5663 b/.werks/5663
new file mode 100644
index 0000000..85d9190
--- /dev/null
+++ b/.werks/5663
@@ -0,0 +1,12 @@
+Title: Fixed adding graphs to graph collections
+Level: 1
+Component: metrics
+Compatible: compat
+Edition: cee
+Version: 1.5.0i3
+Date: 1517315360
+Class: fix
+
+Graphs could not be added to graph collections in all 1.5 releases anymore.
+This made the graph collections not appear in the sidebar, since empty collections
+are not shown there.