Skip to content

Commit

Permalink
Add (basic) performance data when checking ALL replications (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Napsty authored Feb 23, 2022
1 parent 50c6d57 commit 2f9b5ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions check_couchdb_replication.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
# 20220221: Improve output of detected replications #
# 20220222: Handle "One Time" replications, add -i parameter (issue #5) #
# 20220222: Improve all HTTP requests with a dedicated function #
# 20220223: Add (basic) performance data when checking ALL replications #
################################################################################
#Variables and defaults
STATE_OK=0 # define the exit code if status is OK
Expand Down Expand Up @@ -180,10 +181,10 @@ if [[ "${repid}" == "ALL" ]]; then
fi

if [[ ${#failedrepls[*]} -gt 0 ]]; then
echo "COUCHDB REPLICATION CRITICAL: ${#failedrepls[*]} continuous replications not running - Details: ${failedinfo[*]}"
echo "COUCHDB REPLICATION CRITICAL: ${#failedrepls[*]} continuous replications not running - Details: ${failedinfo[*]} | replok=${#successrepls[*]};;;; replfail=${#failedrepls[*]};;;;"
exit $STATE_CRITICAL
else
echo "COUCHDB REPLICATION OK - All ${#successrepls[*]} continuous replications running"; exit $STATE_OK
echo "COUCHDB REPLICATION OK - All ${#successrepls[*]} continuous replications running | replok=${#successrepls[*]};;;; replfail=${#failedrepls[*]};;;;"; exit $STATE_OK
fi

else
Expand Down

0 comments on commit 2f9b5ca

Please sign in to comment.