Module: check_mk
Branch: master
Commit: 694cfb8bb6afeef85ffe10bc8d4cf90668158a78
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=694cfb8bb6afeeā¦
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Nov 17 10:34:29 2015 +0100
#2792 check_mk_agent.aix: now able to use wildcards in the fileinfo.cfg
---
.werks/2792 | 9 +++++++++
ChangeLog | 1 +
agents/check_mk_agent.aix | 4 +++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/2792 b/.werks/2792
new file mode 100644
index 0000000..40c7d67
--- /dev/null
+++ b/.werks/2792
@@ -0,0 +1,9 @@
+Title: check_mk_agent.aix: now able to use wildcards in the fileinfo.cfg
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1447752816
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 0150070..f50e247 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,7 @@
* 2833 isc_dhcpd, win_dhcp_pools: lower levels for used dhcp leases are now
configurable...
* 2789 netapp_api_snapvault: No longer monitors uninitialized volumes...
* 2710 arbor_peakflow_sp, arbor_peakflow_sp.cpu_load, arbor_peakflow_sp.disk_usage,
arbor_peakflow_sp.flows, arbor_peakflow_tms, arbor_peakflow_tms.cpu_load,
arbor_peakflow_tms.disk_usage, arbor_peakflow_tms.host_fault, arbor_peakflow_tms.updates,
arbor_pravail, arbor_pravail.cpu_load, arbor_pravail.disk_usage, arbor_pravail.host_fault:
new checks for various arbor devices
+ * 2792 check_mk_agent.aix: now able to use wildcards in the fileinfo.cfg
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/agents/check_mk_agent.aix b/agents/check_mk_agent.aix
index 71259fd..4c3060d 100755
--- a/agents/check_mk_agent.aix
+++ b/agents/check_mk_agent.aix
@@ -254,7 +254,9 @@ if [ -r "$MK_CONFDIR/fileinfo.cfg" ]; then
echo '<<<fileinfo:sep(124)>>>'
date +%s
# simulate output of the Linux "stat -c "%n|%s|%Y" command
- /usr/bin/perl -e 'printf "$_|%s|%s\n", (stat) [7,9] for @ARGV' $(cat
"$MK_CONFDIR/fileinfo.cfg")
+ # TODO: feel free to improve this command. It opens the perl interpreter for every
file found...
+ for pattern in $(cat "$MK_CONFDIR/fileinfo.cfg" 2>/dev/null); do if [ -f
$pattern ]; then ls -1 "$pattern" ; fi; done |\
+ while read file ; do /usr/bin/perl -e 'printf "$_|%s|%s\n", (stat) [7,9]
for @ARGV' "$file" ; done
fi
# powerHA