change monitor to use host networking and change consul service template healthchecks to port 5579

This commit is contained in:
Jonathan Math 2021-03-09 10:55:58 -05:00
parent 7603e28c72
commit 9da41745be
5 changed files with 9 additions and 8 deletions

View file

@ -7,7 +7,7 @@
"port": 9200,
"checks": [{
"id": "es-ping",
"http": "http://127.0.0.1:5000/db_check/elasticsearch",
"http": "http://{{ ansible_ssh_host }}:5579/db_check/elasticsearch",
"interval": "15s"
}]
}

View file

@ -8,7 +8,7 @@
"port": 27017,
"checks": [{
"id": "mongo-analytics-ping",
"http": "http://127.0.0:5000/db_check/mongo",
"http": "http://{{ ansible_ssh_host }}:5579/db_check/mongo",
"interval": "15s"
}]
}

View file

@ -8,7 +8,7 @@
"port": 27017,
"checks": [{
"id": "mongo-ping",
"http": "http://127.0.0.1:5000/db_check/mongo",
"http": "http://{{ ansible_ssh_host }}:5579/db_check/mongo",
"interval": "15s"
}]
}

View file

@ -21,5 +21,6 @@
restart_policy: unless-stopped
volumes:
- /srv/newsblur:/srv/newsblur
ports:
- 5000:5579
network_mode: host

View file

@ -9,13 +9,13 @@
"checks": [{
"id": "{{inventory_hostname}}-ping",
{% if inventory_hostname == 'db-redis-story' %}
"http": "http://127.0.0.1:5000/db_check/redis_story",
"http": "http://{{ ansible_ssh_host }}:5579/db_check/redis_story",
{% elif inventory_hostname == 'db-redis-user' %}
"http": "http://127.0.0.1:5000/db_check/redis",
"http": "http://{{ ansible_ssh_host }}:5579/db_check/redis",
{% elif inventory_hostname == 'db-redis-pubsub' %}
"http": "http://127.0.0.1:5000/db_check/redis_pubsub",
"http": "http://{{ ansible_ssh_host }}:5579/db_check/redis_pubsub",
{% elif inventory_hostname == 'db-redis-sessions' %}
"http": "http://127.0.0.1:5000/db_check/redis_sessions",
"http": "http://{{ ansible_ssh_host }}:5579/db_check/redis_sessions",
{% endif %}
"interval": "15s"
}]