This commit is contained in:
@@ -1,4 +1,18 @@
|
|||||||
---
|
---
|
||||||
|
# copy configs for loki, promtail & prometheus
|
||||||
|
- name: Create Loki Configuration
|
||||||
|
template:
|
||||||
|
src: templates/monitoring/loki.yaml.j2
|
||||||
|
dest: "{{ data_dir }}/monitoring/loki/loki-config.yaml"
|
||||||
|
- name: Create Promtail Configuration
|
||||||
|
template:
|
||||||
|
src: templates/monitoring/promtail.yaml.j2
|
||||||
|
dest: "{{ data_dir }}/monitoring/promtail/promtail-config.yaml"
|
||||||
|
- name: Create Prometheus Configuration
|
||||||
|
template:
|
||||||
|
src: templates/monitoring/prometheus.yml.j2
|
||||||
|
dest: "{{ data_dir }}/monitoring/prometheus/prometheus.yml"
|
||||||
|
|
||||||
- name: Deploy Prometheus
|
- name: Deploy Prometheus
|
||||||
include_role:
|
include_role:
|
||||||
name: docker
|
name: docker
|
||||||
@@ -27,16 +41,6 @@
|
|||||||
traefik.http.routers.prom.tls.certresolver: letsencrypt
|
traefik.http.routers.prom.tls.certresolver: letsencrypt
|
||||||
traefik.http.services.prom.loadbalancer.server.port: "9090"
|
traefik.http.services.prom.loadbalancer.server.port: "9090"
|
||||||
|
|
||||||
# copy configs for loki
|
|
||||||
- name: Create Loki Configuration
|
|
||||||
template:
|
|
||||||
src: templates/monitoring/loki.yaml.j2
|
|
||||||
dest: "{{ data_dir }}/monitoring/loki/loki-config.yaml"
|
|
||||||
- name: Create Promtail Configuration
|
|
||||||
template:
|
|
||||||
src: templates/monitoring/promtail.yaml.j2
|
|
||||||
dest: "{{ data_dir }}/monitoring/promtail/promtail-config.yaml"
|
|
||||||
|
|
||||||
- name: Deploy Promtail
|
- name: Deploy Promtail
|
||||||
include_role:
|
include_role:
|
||||||
name: docker
|
name: docker
|
||||||
|
|||||||
14
templates/monitoring/prometheus.yml.j2
Normal file
14
templates/monitoring/prometheus.yml.j2
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
global:
|
||||||
|
scrape_interval: 15s
|
||||||
|
evaluation_interval: 15s
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: "prometheus"
|
||||||
|
static_configs:
|
||||||
|
- targets: ["monitoring_prometheus:9090"]
|
||||||
|
- job_name: "node-exporter"
|
||||||
|
static_configs:
|
||||||
|
- targets: ["172.16.0.25:9100"]
|
||||||
|
- job_name: "cadvisor"
|
||||||
|
static_configs:
|
||||||
|
- targets: ["monitoring_cadvisor:8080"]
|
||||||
Reference in New Issue
Block a user