diff --git a/icinga-cli.sh b/icinga-cli.sh index 973b9df8b0f278a50a71d2372fc779b1a0aba352..b5236053e6d188a1085400e7ffa418629287cf30 100755 --- a/icinga-cli.sh +++ b/icinga-cli.sh @@ -22,11 +22,12 @@ # 2023-02-17 v0.15 ah check inc_getconfig.sh exists and hostname -f has a value # 2023-11-01 v0.16 ah generate json with "jo" # 2023-11-02 v0.17 ah fix line breaks of sent output, shell check fixes +# 2023-11-02 v0.18 ah fix quoting of perfdata in json # ====================================================================== _product="ICINGA PASSIVE CLIENT" -_version="0.17" +_version="0.18" _license="GNU GPL 3.0" _copyright='(c) Institute for Medical Education * University of Bern' @@ -351,12 +352,12 @@ function processCheck(){ # # --- extract performance data: # - if ! test -n "$outPerfdata" && echo "$outPerfdata" | grep "=[0-9\.]*;[0-9\.]*;[0-9\.]*;[0-9\.]*;" >/dev/null; then - _elog "WARNING - this does not look like performance data: $outPerfdata" - _elog "command was: $myFullscript $myparams" - _log "${_logPrefix} this does not look like performance data: $outPerfdata" - outPerfdata="" - fi + # if ! test -n "$outPerfdata" && echo "$outPerfdata" | grep "=[0-9\.]*;[0-9\.]*;[0-9\.]*;[0-9\.]*;" >/dev/null; then + # _elog "WARNING - this does not look like performance data: $outPerfdata" + # _elog "command was: $myFullscript $myparams" + # _log "${_logPrefix} this does not look like performance data: $outPerfdata" + # outPerfdata="" + # fi _log "${_logPrefix} check command finished with returncode $rc" _rc=$_rc+$rc @@ -373,7 +374,7 @@ function processCheck(){ ttl=$checkInterval \ execution_start=$iTsStart \ execution_end=$iTsEnd \ - performance_data="\"${outPerfdata}\"" \ + performance_data="${outPerfdata}" \ plugin_output="""${_output}""" )"