mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fiddling with metrics server.
This commit is contained in:
parent
54af4fc46f
commit
8077db09b5
4 changed files with 20 additions and 20 deletions
|
@ -8,16 +8,16 @@
|
|||
- motd_role: db
|
||||
|
||||
roles:
|
||||
- {role: 'base', tags: 'base'}
|
||||
- {role: 'ufw', tags: 'ufw'}
|
||||
- {role: 'docker', tags: 'docker'}
|
||||
- {role: 'repo', tags: ['repo', 'pull']}
|
||||
- {role: 'dnsmasq', tags: 'dnsmasq'}
|
||||
- {role: 'consul', tags: 'consul'}
|
||||
- {role: 'consul-client', tags: 'consul'}
|
||||
- {role: 'mongo-exporter', tags: 'mongo-exporter'}
|
||||
- {role: 'postgres-exporter', tags: 'postgres-exporter'}
|
||||
- {role: 'redis-exporter', tags: 'redis-exporter'}
|
||||
- {role: 'node-exporter', tags: ['node-exporter', 'metrics']}
|
||||
- {role: 'prometheus', tags: ['prometheus', 'metrics']}
|
||||
- {role: 'grafana', tags: ['grafana', 'metrics']}
|
||||
# - {role: 'base', tags: 'base'}
|
||||
# - {role: 'ufw', tags: 'ufw'}
|
||||
# - {role: 'docker', tags: 'docker'}
|
||||
# - {role: 'repo', tags: ['repo', 'pull']}
|
||||
# - {role: 'dnsmasq', tags: 'dnsmasq'}
|
||||
# - {role: 'consul', tags: 'consul'}
|
||||
# - {role: 'consul-client', tags: 'consul'}
|
||||
# - {role: 'mongo-exporter', tags: 'mongo-exporter'}
|
||||
- { role: "postgres-exporter", tags: "postgres-exporter" }
|
||||
- { role: "redis-exporter", tags: "redis-exporter" }
|
||||
- { role: "node-exporter", tags: ["node-exporter", "metrics"] }
|
||||
- { role: "prometheus", tags: ["prometheus", "metrics"] }
|
||||
- { role: "grafana", tags: ["grafana", "metrics"] }
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
- name: Start mongo-exporter container
|
||||
become: yes
|
||||
docker_container:
|
||||
|
@ -12,9 +11,9 @@
|
|||
- name: newsblurnet
|
||||
env:
|
||||
# MONGODB_URI: 'mongodb://{{ inventory_hostname }}.node.nyc1.consul:27017/admin?'
|
||||
MONGODB_URI: 'mongodb://{{ mongodb_username }}:{{ mongodb_password }}@{{ inventory_hostname }}.node.nyc1.consul:27017/admin?authSource=admin'
|
||||
MONGODB_URI: "mongodb://{{ mongodb_username }}:{{ mongodb_password }}@{{ inventory_hostname }}.node.nyc1.consul:27017/admin?authSource=admin"
|
||||
ports:
|
||||
- '9216:9216'
|
||||
- "9216:9216"
|
||||
|
||||
- name: Register mongo-exporter in consul
|
||||
tags: consul
|
||||
|
@ -24,5 +23,5 @@
|
|||
dest: /etc/consul.d/mongo-exporter.json
|
||||
notify:
|
||||
- reload consul
|
||||
- name: Command to register mongo-exporter
|
||||
command: "consul services register /etc/consul.d/mongo-exporter.json"
|
||||
# - name: Command to register mongo-exporter
|
||||
# command: "consul services register /etc/consul.d/mongo-exporter.json"
|
||||
|
|
|
@ -26,4 +26,4 @@
|
|||
- import_playbook: playbooks/setup_metrics.yml
|
||||
when: "'metrics' in inventory_hostname"
|
||||
- import_playbook: playbooks/setup_sentry.yml
|
||||
when: "'sentry' in inventory_hostname"
|
||||
when: "'sentry' in inventory_hostname or 'metrics' in inventory_hostname"
|
||||
|
|
|
@ -213,6 +213,7 @@ backend postgres
|
|||
{% for host in groups.postgres %}
|
||||
server {{host}} {{host}}.node.nyc1.consul:5579
|
||||
{% endfor %}
|
||||
server hdb-postgres-secondary hdb-redis-secondary.node.nyc1.consul:5579
|
||||
|
||||
backend mongo
|
||||
option httpchk GET /db_check/mongo
|
||||
|
@ -234,7 +235,7 @@ backend db_redis_user
|
|||
{% for host in groups.redis_user %}
|
||||
server {{host}} {{host}}.node.nyc1.consul:5579
|
||||
{% endfor %}
|
||||
server db-redis-secondary hdb-redis-secondary.node.nyc1.consul:5579
|
||||
server hdb-redis-secondary hdb-redis-secondary.node.nyc1.consul:5579
|
||||
|
||||
backend db_redis_story
|
||||
option httpchk GET /db_check/redis_story
|
||||
|
|
Loading…
Add table
Reference in a new issue