plugin check_hpux_ovpa_status() requires --log-healthy handling from config file

This commit is contained in:
Patrick Van der Veken 2018-08-30 13:35:35 +02:00
parent 9a44dabd0d
commit 907e45137b
2 changed files with 15 additions and 0 deletions

View File

@ -6,6 +6,11 @@
# [default: indicates hardcoded script values if no value is defined here] # [default: indicates hardcoded script values if no value is defined here]
#****************************************************************************** #******************************************************************************
# specify whether to also log passed health checks
# (warning: this may rapidly grow the HC log)
# [default: no]
log_healthy=yes
# list of OVPA daemons to check (comma-separated list) # list of OVPA daemons to check (comma-separated list)
# [default: oacore,midaemon,perfalarm,ttd,ovcd,ovbbccb,perfd (v12)] # [default: oacore,midaemon,perfalarm,ttd,ovcd,ovbbccb,perfd (v12)]
ovpa_daemons="" ovpa_daemons=""

View File

@ -91,6 +91,16 @@ else
_OVPA_DAEMONS=$(data_comma2space $(data_dequote "${_OVPA_DAEMONS}")) _OVPA_DAEMONS=$(data_comma2space $(data_dequote "${_OVPA_DAEMONS}"))
fi fi
log "checking daemons: ${_OVPA_DAEMONS} ..." log "checking daemons: ${_OVPA_DAEMONS} ..."
_CFG_HEALTHY=$(_CONFIG_FILE="${_CONFIG_FILE}" data_get_lvalue_from_config 'log_healthy')
case "${_CFG_HEALTHY}" in
yes|YES|Yes)
_LOG_HEALTHY=1
;;
*)
# do not override hc_arg
(( _LOG_HEALTHY > 0 )) || _LOG_HEALTHY=0
;;
esac
# log_healthy # log_healthy
(( ARG_LOG_HEALTHY > 0 )) && _LOG_HEALTHY=1 (( ARG_LOG_HEALTHY > 0 )) && _LOG_HEALTHY=1