summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-03-31 21:30:03 +0200
committervarac <varacanero@zeromail.org>2016-03-31 21:30:03 +0200
commitb256733c944d65d0af339c472fcb28237f570ed1 (patch)
tree8980a77e284637331a113e78f94fb952b97f9554 /puppet
parentbdba3c13d48960e275ddd208527b8736fa518e23 (diff)
[bug] Fix couch_stats script
It failed to calculate the sessions and tokens db names. - Resolves: #7658
Diffstat (limited to 'puppet')
-rwxr-xr-xpuppet/modules/site_check_mk/files/agent/local_checks/couchdb/leap_couch_stats.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/puppet/modules/site_check_mk/files/agent/local_checks/couchdb/leap_couch_stats.sh b/puppet/modules/site_check_mk/files/agent/local_checks/couchdb/leap_couch_stats.sh
index 83b407e0..c7477b18 100755
--- a/puppet/modules/site_check_mk/files/agent/local_checks/couchdb/leap_couch_stats.sh
+++ b/puppet/modules/site_check_mk/files/agent/local_checks/couchdb/leap_couch_stats.sh
@@ -11,7 +11,7 @@ start_time=$(date +%s.%N)
CURL='curl -s --netrc-file /etc/couchdb/couchdb.netrc'
URL='http://127.0.0.1:5984'
TMPFILE=$(mktemp)
-DBLIST_EXCLUDE='(user-|sessions_|tokens_)'
+DBLIST_EXCLUDE='(user-|sessions_|tokens_|_replicator|_users)'
PREFIX='Couchdb_'
@@ -104,7 +104,7 @@ do
done
# special handling for rotated dbs
-suffix=$(($(date +'%s') / (60*60*24*30) + 1))
+suffix=$(($(date +'%s') / (60*60*24*30)))
db_stats "sessions_${suffix}" "sessions"
db_stats "tokens_${suffix}" "tokens"