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

Merge branch 'update-confighandler' into 'master'

fix quoting of perfdata in json

See merge request !34
parents f7cf8021 0b38df52
No related branches found
No related tags found
1 merge request!34fix quoting of perfdata in json
...@@ -22,11 +22,12 @@ ...@@ -22,11 +22,12 @@
# 2023-02-17 v0.15 ah check inc_getconfig.sh exists and hostname -f has a value # 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-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.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" _product="ICINGA PASSIVE CLIENT"
_version="0.17" _version="0.18"
_license="GNU GPL 3.0" _license="GNU GPL 3.0"
_copyright='(c) Institute for Medical Education * University of Bern' _copyright='(c) Institute for Medical Education * University of Bern'
...@@ -351,12 +352,12 @@ function processCheck(){ ...@@ -351,12 +352,12 @@ function processCheck(){
# #
# --- extract performance data: # --- extract performance data:
# #
if ! test -n "$outPerfdata" && echo "$outPerfdata" | grep "=[0-9\.]*;[0-9\.]*;[0-9\.]*;[0-9\.]*;" >/dev/null; then # 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 "WARNING - this does not look like performance data: $outPerfdata"
_elog "command was: $myFullscript $myparams" # _elog "command was: $myFullscript $myparams"
_log "${_logPrefix} this does not look like performance data: $outPerfdata" # _log "${_logPrefix} this does not look like performance data: $outPerfdata"
outPerfdata="" # outPerfdata=""
fi # fi
_log "${_logPrefix} check command finished with returncode $rc" _log "${_logPrefix} check command finished with returncode $rc"
_rc=$_rc+$rc _rc=$_rc+$rc
...@@ -373,7 +374,7 @@ function processCheck(){ ...@@ -373,7 +374,7 @@ function processCheck(){
ttl=$checkInterval \ ttl=$checkInterval \
execution_start=$iTsStart \ execution_start=$iTsStart \
execution_end=$iTsEnd \ execution_end=$iTsEnd \
performance_data="\"${outPerfdata}\"" \ performance_data="${outPerfdata}" \
plugin_output="""${_output}""" plugin_output="""${_output}"""
)" )"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment