Module: check_mk
Branch: master
Commit: 555cbb5825f4852c6fdfb35b882536eec7b7a922
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=555cbb5825f485…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Jul 21 15:17:45 2014 +0200
MegaCli: Agent now also supports the 64bit version (Thanks to Philipp Lemke)
---
.werks/182 | 8 ++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 16 ++++++++++++----
3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/.werks/182 b/.werks/182
new file mode 100644
index 0000000..6f5aff3
--- /dev/null
+++ b/.werks/182
@@ -0,0 +1,8 @@
+Title: MegaCli: Agent now also supports the 64bit version (Thanks to Philipp Lemke)
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1405948589
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 97e98c0..11664c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,7 @@
* 0637 jolokia_metrics.gc, jolokia_metrics.tp, jolokia_info: two new subchecks for
the jolokia_metrics checks and better error handling for jolokia_info...
* 1000 qlogic_sanbox.temp: New Check for temperature sensors in QLogic SANbox Fibre
Channel Switches
* 1001 qlogic_sanbox.psu: New Check for power supplies in QLogic SANbox Fibre Channel
Switches
+ * 0182 MegaCli: Agent now also supports the 64bit version (Thanks to Philipp Lemke)
* 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...
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index afb5de4..63b5a1a 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -317,19 +317,27 @@ fi
#
http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.02.16_MegaC…
if type MegaCli >/dev/null ; then
+ MegaCli_bin="MegaCli"
+elif type MegaCli64 >/dev/null ; then
+ MegaCli_bin="MegaCli64"
+else
+ MegaCli_bin="unknown"
+fi
+
+if [ "$MegaCli_bin" != "unknown" ]; then
echo '<<<megaraid_pdisks>>>'
- for part in $(MegaCli -EncInfo -aALL -NoLog < /dev/null \
+ for part in $($MegaCli_bin -EncInfo -aALL -NoLog < /dev/null \
| sed -rn 's/:/ /g; s/[[:space:]]+/ /g; s/^ //; s/ $//; s/Number of
enclosures on adapter ([0-9]+).*/adapter \1/g; /^(Enclosure|Device ID|adapter) [0-9]+$/
p'); do
[ $part = adapter ] && echo ""
[ $part = 'Enclosure' ] && echo -ne "\ndev2enc"
echo -n " $part"
done
echo
- MegaCli -PDList -aALL -NoLog < /dev/null | egrep 'Enclosure|Raw Size|Slot
Number|Device Id|Firmware state|Inquiry|Adapter'
+ $MegaCli_bin -PDList -aALL -NoLog < /dev/null | egrep 'Enclosure|Raw Size|Slot
Number|Device Id|Firmware state|Inquiry|Adapter'
echo '<<<megaraid_ldisks>>>'
- MegaCli -LDInfo -Lall -aALL -NoLog < /dev/null | egrep
'Size|State|Number|Adapter|Virtual'
+ $MegaCli_bin -LDInfo -Lall -aALL -NoLog < /dev/null | egrep
'Size|State|Number|Adapter|Virtual'
echo '<<<megaraid_bbu>>>'
- MegaCli -AdpBbuCmd -GetBbuStatus -aALL -NoLog < /dev/null | grep -v Exit
+ $MegaCli_bin -AdpBbuCmd -GetBbuStatus -aALL -NoLog < /dev/null | grep -v Exit
fi
# 3WARE disk controller (by Radoslaw Bak)