diff --git a/icinga-cli.sh b/icinga-cli.sh index 51ecb4269098b61be49b98cc2bea8a74faf5b49b..f8ccc9b7cfe12bce82f6dcd8fe7b8b391ff6df32 100755 --- a/icinga-cli.sh +++ b/icinga-cli.sh @@ -352,6 +352,13 @@ function processCheck(){ _elog "${_logPrefix} $( ls -ld ${dir_data} $_outfile )" exit 1 fi + typeset -i local iTsEnd=`date +%s` + # outPerfdata=`grep '|' $_outfile | cut -f 2 -d '|'` + outPerfdata=`grep '|' $_outfile | rev | cut -f 1 -d '|' | rev` + _echo + _echo -------- check output: + _echo $( cat "$_outfile" ) + iPipes=$( sed 's#[^|]##g' "$_outfile" | grep "." | wc -L ) _echo "Pipe chars: $iPipes" if [[ $iPipes -gt 1 ]]; then @@ -359,12 +366,6 @@ function processCheck(){ exit 1 fi - typeset -i local iTsEnd=`date +%s` - # outPerfdata=`grep '|' $_outfile | cut -f 2 -d '|'` - outPerfdata=`grep '|' $_outfile | rev | cut -f 1 -d '|' | rev` - _echo - _echo -------- check output: - _echo $( cat "$_outfile" ) _echo # echo -------- extracted performance data: # echo $outPerfdata