Module: check_mk
Branch: master
Commit: e7963df8d85b81758767e1df838e49601e73dced
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e7963df8d85b81…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 23 16:20:28 2012 +0200
AIX: convert NIC check to lnx_if
---
ChangeLog | 3 +++
agents/check_mk_agent.aix | 5 ++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 91b11f1..a7d908a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@
* New aggregation function count_ok, that counts the number
of nodes in state OK.
+ Checks & Agents:
+ * AIX: convert NIC check to lnx_if (now being compatible with if/if64)
+
1.2.0b4:
Core:
* New configuration variable snmp_timing, allowing to
diff --git a/agents/check_mk_agent.aix b/agents/check_mk_agent.aix
index 238b23d..c0133e3 100755
--- a/agents/check_mk_agent.aix
+++ b/agents/check_mk_agent.aix
@@ -69,8 +69,7 @@ echo $load 1/$ps $$ $procs
# The following section has been contributed by Joerg Linge
-echo "<<<netctr>>>"
-date +%s
+echo "<<<lnx_if:sep(58)>>>"
for ent in $(ifconfig -a | grep '^en' | cut -d ":" -f 1)
do
bytes=$(entstat $ent | grep ^Bytes: | awk '{printf "%s %s", $2,
$4}')
@@ -81,7 +80,7 @@ do
packets_tx=$(echo $packets | awk '{print $1'})
errors_tx=$(entstat $ent | grep 'Transmit Errors:' | awk '{print
$3'})
errors_rx=$(entstat $ent | grep 'Receive Errors:' | awk '{print
$6'})
- echo "$ent $bytes_rx $packets_rx $errors_rx 0 0 0 0 0 $bytes_tx $packets_tx
$errors_tx 0 0 0 0 0"
+ echo "$ent: $bytes_rx $packets_rx $errors_rx 0 0 0 0 0 $bytes_tx $packets_tx
$errors_tx 0 0 0 0 0"
done