Skip to content
Snippets Groups Projects
Commit 0b38df52 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

fix quoting of perfdata in json

parent 3e474ad5
No related branches found
No related tags found
1 merge request!34fix quoting of perfdata in json
......@@ -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}"""
)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment