Commit c4c309ba authored by ale's avatar ale

Merge branch 'karma-config-file' into 'master'

prometheus: use karma config file

See merge request !114
parents d73cba90 ed10c9aa
Pipeline #6756 failed with stages
in 10 minutes and 7 seconds
......@@ -23,3 +23,9 @@
name: docker-prometheus-grafana.service
state: restarted
listen: "restart grafana"
- name: restart karma
systemd:
name: docker-prometheus-karma.service
state: restarted
listen: "reload karma"
......@@ -58,3 +58,14 @@
loop:
- alertmanager
- metrics2
- name: Create /etc/karma
file:
path: /etc/karma
state: directory
- name: Install Karma configuration
template:
src: karma.yml.j2
dest: "/etc/karma/float.yml"
notify: "reload karma"
# https://github.com/prymitive/karma/blob/master/docs/CONFIGURATION.md
alertmanager:
servers:
- name: "{{ domain }}"
uri: "http://prometheus.{{ domain }}:9093"
proxy: true
# Auto-fill silence dialog with the authenticated user
authentication:
header:
name: X-Authenticated-User
value_re: ^(.+)$
# Start with 'description' label collapsed
annotations:
hidden:
- description
filters:
default:
- "@state=active"
......@@ -133,7 +133,11 @@ prometheus:
ports:
- 9193
env:
ALERTMANAGER_URI: "http://prometheus.{{ domain }}:9093"
# https://github.com/prymitive/karma/blob/master/docs/CONFIGURATION.md#environment-variables
CONFIG_FILE: "/etc/karma/float.yml"
PORT: 9193
volumes:
- /etc/karma: /etc/karma
public_endpoints:
- name: monitor
port: 9090
......
......@@ -99,7 +99,11 @@ prometheus:
ports:
- 9193
env:
ALERTMANAGER_URI: "http://prometheus.{{ domain }}:9093"
# https://github.com/prymitive/karma/blob/master/docs/CONFIGURATION.md#environment-variables
CONFIG_FILE: "/etc/karma/float.yml"
PORT: 9193
volumes:
- /etc/karma: /etc/karma
public_endpoints:
- name: monitor
port: 9090
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment