summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-04-08 17:42:43 +0200
committervarac <varacanero@zeromail.org>2015-04-08 17:42:43 +0200
commit75bdd84d642491166fa90ecff117e679b4af334a (patch)
tree0c0900294df2087b99f252ba3fdfead69de3617e
parentdbe413c969a54be0a91fe1de1930eb20d885deb6 (diff)
Fix for Tapicero heartbeat check that fails on days 1-9 of the month (#6832)
Change-Id: If9e17de438a4a6ac8e68877bfe0c5d13d45386ee
-rwxr-xr-xpuppet/modules/site_nagios/files/plugins/check_last_regex_in_log2
1 files changed, 1 insertions, 1 deletions
diff --git a/puppet/modules/site_nagios/files/plugins/check_last_regex_in_log b/puppet/modules/site_nagios/files/plugins/check_last_regex_in_log
index cf7c03e5..47569388 100755
--- a/puppet/modules/site_nagios/files/plugins/check_last_regex_in_log
+++ b/puppet/modules/site_nagios/files/plugins/check_last_regex_in_log
@@ -50,7 +50,7 @@ done
[ $warn -eq 0 -o $crit -eq 0 -o -z "$regex" -o -z "$log" ] && ( usage; exit $STATE_UNKNOWN)
[ -f "$log" ] || (echo "$log doesn't exist"; exit $STATE_UNKNOWN)
-lastmsg=$(tac $log | grep -i $regex | head -1 | cut -d' ' -f 1-3)
+lastmsg=$(tac $log | grep -i $regex | head -1 | sed 's/ / /g' | cut -d' ' -f 1-3)
if [ -z "$lastmsg" ]
then