Not sure where redis log is coming from, but it should still be recorded.

This commit is contained in:
Samuel Clay 2021-08-03 16:46:34 -04:00
parent 078ce11034
commit d767310a31
2 changed files with 3 additions and 1 deletions

View file

@ -106,7 +106,7 @@
- /srv/newsblur/config/mongodb_keyfile.key:/srv/newsblur/config/mongodb_keyfile.key
- /var/log/mongodb/:/var/log/mongodb/
- /opt/mongo/newsblur/backup/:/backup/
when: (inventory_hostname | regex_replace('[0-9]+', '')) in ['db-mongo', 'db-mongo-secondary']
when: (inventory_hostname | regex_replace('[0-9]+', '')) == 'db-mongo-analytics'
- name: Register mongo in consul
tags: consul

View file

@ -148,6 +148,8 @@ class SQLLogToConsoleMiddleware:
query['sql'] = "~FM%s: %s" % (query['mongo']['collection'], query['mongo']['query'])
elif query.get('db_redis'):
query['sql'] = "~FC%s" % (query['db_redis']['query'])
elif query.get('redis'):
query['sql'] = "~FC%s" % (query['redis']['query'])
elif query.get('redis_user'):
query['sql'] = "~FC%s" % (query['redis_user']['query'])
elif query.get('redis_story'):