diff --git a/inc_pluginfunctions b/inc_pluginfunctions index dca76fef66d10d3ea98d55766166a96a53e4f471..0e239a3173ac339e6374eaf99858bad1cca37f76 100644 --- a/inc_pluginfunctions +++ b/inc_pluginfunctions @@ -32,6 +32,7 @@ # 2022-08-31 v1.4 <axel.hahn@iml.unibe.ch> shellfix corrections # 2022-10-25 v1.5 <axel.hahn@iml.unibe.ch> handle empty value in ph.perfadd # 2023-01-30 v1.6 <axel.hahn@unibe.ch> check performance params 5+6 and show a warning if missing +# 2023-02-16 v1.7 <axel.hahn@unibe.ch> adding a generic min and max value did not really help # ====================================================================== @@ -440,12 +441,19 @@ function ph.perfadd(){ local _max=$6 test -z "$_value" && _value=0 - test -z "$_min" && echo "WARNING from ph.perfadd: missing param 5 for minimum - setting it to 0" - test -z "$_min" && _min=0 - test -z "$_max" && echo "WARNING from ph.perfadd: missing param 6 for maxiumun - setting it to 100" - test -z "$_max" && _max=100 - - echo "${_label}=${_value};${_w};${_c};${_min};${_max}" >>"${ph_perfdatafile}" + + # adding a generic min and max value did not really help + # test -z "$_min" && echo "WARNING from ph.perfadd: missing param 5 for minimum - setting it to 0" + # test -z "$_min" && _min=0 + # test -z "$_max" && echo "WARNING from ph.perfadd: missing param 6 for maxiumun - setting it to 100" + # test -z "$_max" && _max=100 + # ... so we add them if tey exist only + local _minmax= + test -n "$_min" && _minmax+=";$_min" + test -n "$_max" && _minmax+=";$_max" + + # echo "${_label}=${_value};${_w};${_c};${_min};${_max}" >>"${ph_perfdatafile}" + echo "${_label}=${_value};${_w};${_c}${_minmax}" >>"${ph_perfdatafile}" }