copy prometheus config
Some checks failed
Deploy Containers / Prepare (push) Failing after 12s

This commit is contained in:
2025-12-28 16:58:18 -05:00
parent fa8fba6fb6
commit f62396b1d0
2 changed files with 28 additions and 10 deletions

View File

@@ -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
include_role:
name: docker
@@ -27,16 +41,6 @@
traefik.http.routers.prom.tls.certresolver: letsencrypt
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
include_role:
name: docker

View 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"]