Module: check_mk
Branch: master
Commit: 52621ae0d8f2edde54037699d9800afb441ab1d2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=52621ae0d8f2ed…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Oct 21 14:52:33 2015 +0200
#1296 FIX aix_memory: Check can now handle systems without swap partition
---
.werks/1296 | 9 +++++++++
ChangeLog | 1 +
checks/aix_memory | 3 +++
3 files changed, 13 insertions(+)
diff --git a/.werks/1296 b/.werks/1296
new file mode 100644
index 0000000..e551668
--- /dev/null
+++ b/.werks/1296
@@ -0,0 +1,9 @@
+Title: aix_memory: Check can now handle systems without swap partition
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1445431924
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 41eadc9..8244b66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@
* 2683 FIX: Fixed exceptions occuring in some ps checks...
* 2662 FIX: windows agent: fixed inventory running every time when ipv6 was
activated...
* 2697 FIX: hp_msa_controller.io, hp_msa_disk.io, hp_msa_volume.io: fixed broken I/O
calculation
+ * 1296 FIX: aix_memory: Check can now handle systems without swap partition
Multisite:
* 2680 FIX: LDAP: Fixed exception when syncing groups using configurations from
previous versions...
diff --git a/checks/aix_memory b/checks/aix_memory
index 7e5a38f..1c8a8e1 100644
--- a/checks/aix_memory
+++ b/checks/aix_memory
@@ -57,6 +57,9 @@
# output from /proc/meminfo. AIX speaks of 4k pages while Linux of kilobytes.
def parse_aix_memory(info):
parsed = {}
+ # In case that the system dont have swap configured
+ parsed["SwapTotal"] = 0
+ parsed["SwapFree"] = 0
for line in info:
if line[0] == "allocated": # Swap space
parsed["SwapTotal"] = int(line[2]) * 4