Module: check_mk
Branch: master
Commit: bd349fad34b2eb9ef5cda3c350d005cfbd0d9574
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bd349fad34b2eb…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Jun 26 11:17:58 2014 +0200
FIX mk_inventory.linux: Changed field separator from pipe to tab
Some rpm packages using the pipe symbol as part of her description. Cause of this reason we need another internal separator.
---
.werks/167 | 9 +++++++++
ChangeLog | 3 +++
agents/plugins/mk_inventory.linux | 4 ++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/167 b/.werks/167
new file mode 100644
index 0000000..a1f5226
--- /dev/null
+++ b/.werks/167
@@ -0,0 +1,9 @@
+Title: mk_inventory.linux: Changed field separator from pipe to tab
+Level: 1
+Component: inv
+Version: 1.2.5i5
+Date: 1403774134
+Class: fix
+
+Some rpm packages using the pipe symbol as part of her description. Cause of this reason we need another internal separator.
+
diff --git a/ChangeLog b/ChangeLog
index d610c5c..993f67e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
Checks & Agents:
* 0994 FIX: agent plugin smart: fixed syntax error
+ HW/SW-Inventory:
+ * 0167 FIX: mk_inventory.linux: Changed field separator from pipe to tab...
+
1.2.5i4:
Core & Setup:
diff --git a/agents/plugins/mk_inventory.linux b/agents/plugins/mk_inventory.linux
index 0ae6af6..2f2ece1 100755
--- a/agents/plugins/mk_inventory.linux
+++ b/agents/plugins/mk_inventory.linux
@@ -20,8 +20,8 @@ then
# List of RPM packages in same format
if type rpm >/dev/null; then
- echo "<<<lnx_packages:sep(124):persist($UNTIL)>>>"
- rpm -qa --qf '%{NAME}|%{VERSION}|%{ARCH}|rpm|%{SUMMARY}|\n'
+ echo "<<<lnx_packages:sep(9):persist($UNTIL)>>>"
+ rpm -qa --qf '%{NAME}\t%{VERSION}\t%{ARCH}\trpm\t%{SUMMARY}\t-\n'
fi
# Information about distribution
Module: check_mk
Branch: master
Commit: 1b64aa2fedc8448c7ea4b48ff0f30a1b04d0b266
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1b64aa2fedc844…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jun 26 14:39:03 2014 +0200
Fix quoting of \ in custom checks with nagios core
When you are using Nagios as montitoring core then backslashes contained
in <tt>custom_checks</tt> (Classical active and passive Nagios checks) would
be interpreted by Nagios. That way single backslashes would usually vanish
und you would have to duplicate them.
The Check_MK Micro Core never interpreted these backslashes so it was
transparent for the user.
This fix changes the behaviour of Check_MK in a way that also with the
Nagios core you need only one backslash. Backslashes are transparent
now.
<b>NOTE</b>: If you have custom checks that contain backslashes (for
example as part of names or passwords) then you need to remove
duplicate backslashes after this update!
---
.werks/1012 | 22 ++++++++++++++++++++++
ChangeLog | 4 ++++
modules/check_mk.py | 2 +-
3 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/.werks/1012 b/.werks/1012
new file mode 100644
index 0000000..98744fe
--- /dev/null
+++ b/.werks/1012
@@ -0,0 +1,22 @@
+Title: Fix quoting of \ in custom checks with nagios core
+Level: 2
+Component: core
+Version: 1.2.5i5
+Date: 1403786142
+Class: incomp
+
+When you are using Nagios as montitoring core then backslashes contained
+in <tt>custom_checks</tt> (Classical active and passive Nagios checks) would
+be interpreted by Nagios. That way single backslashes would usually vanish
+und you would have to duplicate them.
+
+The Check_MK Micro Core never interpreted these backslashes so it was
+transparent for the user.
+
+This fix changes the behaviour of Check_MK in a way that also with the
+Nagios core you need only one backslash. Backslashes are transparent
+now.
+
+<b>NOTE</b>: If you have custom checks that contain backslashes (for
+example as part of names or passwords) then you need to remove
+duplicate backslashes after this update!
diff --git a/ChangeLog b/ChangeLog
index 488d804..c4938ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
1.2.5i5:
+ Core & Setup:
+ * 1012 Fix quoting of \ in custom checks with nagios core...
+ NOTE: Please refer to the migration notes!
+
Checks & Agents:
* 0994 FIX: agent plugin smart: fixed syntax error
* 0989 FIX: logwatch.ec: Fix forwarding multiple messages via syslog/TCP...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 86dfb29..78c4403 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -2411,7 +2411,7 @@ define service {
continue
if command_line:
- command_line = autodetect_plugin(command_line)
+ command_line = autodetect_plugin(command_line).replace("\\", "\\\\")
if "freshness" in entry:
freshness = " check_freshness\t\t1\n" + \
Module: check_mk
Branch: master
Commit: 8fc47589b3ccb0eee4d450222b580f2125ae2004
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8fc47589b3ccb0…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jun 26 14:21:20 2014 +0200
FIX oracle_tablespaces: fixed calculation of space left and number of remaining increments
The remaining increments and space left was not correctly calculated when the
remaining memory space was not a multiple of the increment size.<br>
For example:<br>
C+:
Tablespace
900 MB used
100 MB free space for autoincrement
200 MB increment size
C-:
The previous version calculated 900 MB as maximum size, because the increment size was greater
than the remaining autoincrement space. This was wrong. The last increment also uses the remaining
space, even if the remaining size is smaller than the increment size.<br><br>
As a result, this fix actually increases the amount of available free space,
so it should not have any negative side effects for already configured limits.
---
.werks/944 | 26 ++++++++++++++++++++++++++
ChangeLog | 1 +
checks/oracle_tablespaces | 11 ++++++++---
3 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/.werks/944 b/.werks/944
new file mode 100644
index 0000000..981ada8
--- /dev/null
+++ b/.werks/944
@@ -0,0 +1,26 @@
+Title: oracle_tablespaces: fixed calculation of space left and number of remaining increments
+Level: 2
+Component: checks
+Version: 1.2.5i5
+Date: 1403784236
+Class: fix
+
+The remaining increments and space left was not correctly calculated when the
+remaining memory space was not a multiple of the increment size.<br>
+For example:<br>
+
+C+:
+Tablespace
+900 MB used
+100 MB free space for autoincrement
+
+200 MB increment size
+C-:
+
+The previous version calculated 900 MB as maximum size, because the increment size was greater
+than the remaining autoincrement space. This was wrong. The last increment also uses the remaining
+space, even if the remaining size is smaller than the increment size.<br><br>
+
+As a result, this fix actually increases the amount of available free space,
+so it should not have any negative side effects for already configured limits.
+
diff --git a/ChangeLog b/ChangeLog
index 52ba5bc..488d804 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* 0994 FIX: agent plugin smart: fixed syntax error
* 0989 FIX: logwatch.ec: Fix forwarding multiple messages via syslog/TCP...
* 0943 FIX: if.include: fixed incorrect traffic percentage values in the check output of if checks...
+ * 0944 FIX: oracle_tablespaces: fixed calculation of space left and number of remaining increments...
WATO:
* 0990 FIX: Fix HTTP error handling in bulk inventory...
diff --git a/checks/oracle_tablespaces b/checks/oracle_tablespaces
index 05cb437..f4971b0 100644
--- a/checks/oracle_tablespaces
+++ b/checks/oracle_tablespaces
@@ -202,10 +202,15 @@ def check_oracle_tablespaces(item, params, info):
incsize = int(line[8]) # size of next increment in blocks
if incsize == 1:
uses_default_increment = True
- incs = free_bl / incsize
+
+ incs, rest = divmod(free_bl, incsize)
+ if rest:
+ incs += 1
+
num_increments += incs
- increment_size += blocksize * incsize * incs
- free_space += blocksize * (incsize * incs + (int(line[12])))
+ increment_size += blocksize * incsize * incs - rest * blocksize
+ free_space += blocksize * (incsize * incs + (int(line[12]))) - rest * blocksize
+
# not autoextensible: take current size as maximum
else:
my_max_size = blocksize * int(line[5])