kolla-ansible/ansible/roles/prometheus/templates/prometheus-server.json.j2
Doug Szumski 9d495504be Set external web URL for Prometheus services
This change ensures that URLs returned from these services reference
the HAProxy endpoint, rather than the host on which the service is
running.

Closes-Bug: #1825150
Change-Id: I7f966ff749ea37620f1bde7019a598cb9505fa45
2019-04-17 11:24:52 +01:00

33 lines
1.1 KiB
Django/Jinja

{
"command": "/opt/prometheus/prometheus -config.file /etc/prometheus/prometheus.yml -web.listen-address {{ api_interface_address }}:{{ prometheus_port }} -web.external-url={{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ prometheus_port }} -log.format logger:stdout -storage.local.path /var/lib/prometheus",
"config_files": [
{
"source": "{{ container_config_directory }}/prometheus.yml",
"dest": "/etc/prometheus/prometheus.yml",
"owner": "prometheus",
"perm": "0600"
}
{% if enable_prometheus_alertmanager %}
,{
"source": "{{ container_config_directory }}/*.rules",
"dest": "/etc/prometheus/",
"optional": true,
"owner": "prometheus",
"perm": "0600"
}
{% endif %}
],
"permissions": [
{
"path": "/data",
"owner": "prometheus:kolla",
"recurse": true
},
{
"path": "/var/log/kolla/prometheus",
"owner": "prometheus:kolla",
"recurse": true
}
]
}