From 75bdd84d642491166fa90ecff117e679b4af334a Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 8 Apr 2015 17:42:43 +0200 Subject: Fix for Tapicero heartbeat check that fails on days 1-9 of the month (#6832) Change-Id: If9e17de438a4a6ac8e68877bfe0c5d13d45386ee --- puppet/modules/site_nagios/files/plugins/check_last_regex_in_log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'puppet/modules/site_nagios') 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 -- cgit v1.2.3