Commit 02cda120 by Max Rothman

Merge pull request #2214 from edx/max/mongostat

Add mongostat logging
parents e4848f95 77224bdd
......@@ -61,3 +61,4 @@ MONGO_S3_S3CMD_CONFIG: "{{ COMMON_DATA_DIR }}/mongo-s3-backup.s3cfg"
MONGO_S3_BACKUP_AWS_ACCESS_KEY: !!null
MONGO_S3_BACKUP_AWS_SECRET_KEY: !!null
MONGO_LOG_MONGOSTAT: true
......@@ -160,3 +160,19 @@
minute="0"
day="{{ MONGO_S3_BACKUP_DAY }}"
when: MONGO_S3_BACKUP
- name: add mongostat logging script
template:
src="edx/bin/log-mongostat.sh.j2"
dest="{{ COMMON_BIN_DIR }}/log-mongostat.sh"
owner="{{ mongo_user }}"
group="{{ mongo_user }}"
mode=0700
when: MONGO_LOG_MONGOSTAT
- name: add mongostat logging script to cron
cron:
name: "mongostat logging job"
job: /edx/bin/log-mongostat.sh >{{ mongo_log_dir }}/mongostat.log 2>&1
become: yes
when: MONGO_LOG_MONGOSTAT
/usr/bin/mongostat -u {{ MONGO_ADMIN_USER }} --authenticationDatabase admin -p '{{ MONGO_ADMIN_PASSWORD }}' --all -n 1 --json
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment