kolla-ansible/ansible/roles/prometheus/templates/prometheus-server.json.j2
Jorge Niedbalski 0ec41f2092 [prometheus] Allow custom alert rules to be configured.
This patch extends the configuration task for prometheus
to allow the operator to pass a(set) of prometheus alert
rules files, that will be used by alertmanager to produce
alerts.

This functionality is only enabled when the prometheus-alertmanager
service is enabled.

Change-Id: I882759c3774f43640631c1058f8a9cb24e7a60d2
Closes-Bug: #1776529
Signed-off-by: Jorge Niedbalski <jorge.niedbalski@linaro.org>
2018-08-08 12:48:41 -04:00

33 lines
1022 B
Django/Jinja

{
"command": "/opt/prometheus/prometheus -config.file /etc/prometheus/prometheus.yml -web.listen-address {{ api_interface_address }}:{{ 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
}
]
}