Module: check_mk
Branch: master
Commit: 6cd51239cd3c6b315fab4fe9e81706b5e43aa6bb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6cd51239cd3c6b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 28 10:30:33 2015 +0200
#2496 FIX Fixed CPU load checks when monitoring raspbian/babanian systems
---
.werks/2496 | 9 +++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 7 ++++++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/2496 b/.werks/2496
new file mode 100644
index 0000000..6505c7a
--- /dev/null
+++ b/.werks/2496
@@ -0,0 +1,9 @@
+Title: Fixed CPU load checks when monitoring raspbian/babanian systems
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1438072191
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 3f38fc8..edf312f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -81,6 +81,7 @@
* 2488 FIX: veem_jobs: fix problems with spaces or single quotes in the names of
jobs...
* 2494 FIX: Clasic SNMP mode now uses normal snmpwalk when bulkwalks are disabled
with SNMPv3
* 2495 FIX: printer_supply: Fixed exception when unit type is not available via SNMP
+ * 2496 FIX: Fixed CPU load checks when monitoring raspbian/babanian systems
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 42ccdf3..38faab7 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -210,7 +210,12 @@ egrep -v '^Swap:|^Mem:|total:' < /proc/meminfo
# Load and number of processes
echo '<<<cpu>>>'
-echo "$(cat /proc/loadavg) $(grep -E '^CPU|^processor' < /proc/cpuinfo |
wc -l)"
+if [ $(uname -m) = "armv7l" ]; then
+ CPU_REGEX='^processor'
+else
+ CPU_REGEX='^CPU|^processor'
+fi
+echo "$(cat /proc/loadavg) $(grep -E $CPU_REGEX < /proc/cpuinfo | wc -l)"
# Uptime
echo '<<<uptime>>>'