diff --git a/etc/opt/hc/check_linux_vz_ct_counters.conf.dist b/etc/opt/hc/check_linux_vz_ct_counters.conf.dist index 2748216..a0f7e74 100644 --- a/etc/opt/hc/check_linux_vz_ct_counters.conf.dist +++ b/etc/opt/hc/check_linux_vz_ct_counters.conf.dist @@ -11,7 +11,7 @@ # [default: no] log_healthy="no" -# specify UBC names to exclude from being checked (comma-separated list) +# specify UBC names to exclude (comma-separated list) (release >20200411) # [default: none] # Examples: numfile,numpty exclude_counters="" diff --git a/opt/hc/lib/platform/linux/check_linux_vz_ct_counters.sh b/opt/hc/lib/platform/linux/check_linux_vz_ct_counters.sh index 693d32e..ff2445f 100755 --- a/opt/hc/lib/platform/linux/check_linux_vz_ct_counters.sh +++ b/opt/hc/lib/platform/linux/check_linux_vz_ct_counters.sh @@ -64,6 +64,7 @@ typeset _UBC_HELD="" typeset _UBC_MAX_HELD="" typeset _UBC_STATE_FILE_STUB="${STATE_PERM_DIR}/vzct.failtcnt" typeset _UBC_STATE_FILE="" +typeset _RC=0 # handle arguments (originally comma-separated) for _ARG in ${_ARGS} @@ -231,6 +232,7 @@ do done else warn "unable to find UBC data for CT ID ${_CT_ID}" + _RC=$(( _RC + 1 )) continue fi done @@ -239,7 +241,7 @@ done print "==== ${_UBC_FILE} ====" >>${HC_STDOUT_LOG} print "${_UBC_OUTPUT}" >>${HC_STDOUT_LOG} -return 0 +return ${_RC} } # ----------------------------------------------------------------------------- @@ -249,13 +251,13 @@ cat <<- EOT NAME : $1 VERSION : $2 CONFIG : $3 with parameters: - exclude_counters=,,... + exclude_counters=,,... (release >20200411) with formatted stanzas: ct: PURPOSE : Checks whether UBC (User Bean Counters) for OpenVZ containers have increased (failures) LOG HEALTHY : Supported -NOTES : Supports OpenVZ 6.x & OpenVZ 7.x +NOTES : Supports OpenVZ 6.x & OpenVZ 7.x (release >20200411) EOT