17450f35f3
Added Influxdb relay to make the existing monitoring stack highly available. Relay replicates the data to multiple database instances. Also added configutation in HAProxy that load balances the read queries to influxdb instances and write queries to influxdb relays ┌─────────────────┐ │writes & queries │ └─────────────────┘ │ ▼ ┌───────────────┐ │ │ ┌────────│ Load Balancer │─────────┐ │ │ │ │ │ └──────┬─┬──────┘ │ │ │ │ │ │ │ │ │ │ ┌──────┘ └────────┐ │ │ │ ┌─────────────┐ │ │┌──────┐ │ │ │/write or UDP│ │ ││/query│ │ ▼ └─────────────┘ ▼ │└──────┘ │ ┌──────────┐ ┌──────────┐ │ │ │ InfluxDB │ │ InfluxDB │ │ │ │ Relay │ │ Relay │ │ │ └──┬────┬──┘ └────┬──┬──┘ │ │ │ | | │ │ │ | ┌─┼──────────────┘ | │ │ │ │ └──────────────┐ │ │ │ ▼ ▼ ▼ ▼ │ │ ┌──────────┐ ┌──────────┐ │ │ │ │ │ │ │ └─▶│ InfluxDB │ │ InfluxDB │◀─┘ │ │ │ │ └──────────┘ └──────────┘ This patch is dependent on this patch: https://review.openstack.org/#/c/392328/ Change-Id: I05bdaa0e2fb251b48df1d26d09ad63942872293a
11 lines
301 B
Django/Jinja
11 lines
301 B
Django/Jinja
[[http]]
|
|
name = "example-http"
|
|
bind-addr = '0.0.0.0:{{ influxdb_relay_port }}'
|
|
output = [
|
|
{% set i =1%}
|
|
{%for host_name in groups['cluster-metrics'] %}
|
|
{ name="local{{ i }}", location = "http://{{ hostvars[host_name]['ansible_host'] }}:{{ influxdb_port }}/write"},
|
|
{%set i = i + 1%}
|
|
{%endfor%}
|
|
]
|