refactor: rethink monitoring structure | add Loki && Promtail | new Grafana conf

This commit is contained in:
2025-07-09 01:30:11 -03:00
parent 2d182eaf9c
commit 130575ffd3
7 changed files with 236 additions and 62 deletions

View File

@@ -1,8 +1,12 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['prometheus:9090']
@@ -10,15 +14,29 @@ scrape_configs:
- job_name: 'node'
static_configs:
- targets: ['node-exporter:9100']
- job_name: 'crowdsec'
static_configs:
- targets: ['crowdsec:6060']
- job_name: 'caddy'
static_configs:
- targets: ['caddy:2019']
scrape_interval: 5s
metrics_path: /metrics
- job_name: 'cadvisor'
static_configs:
- targets: ['cadvisor:8080']
scrape_interval: 5s
metrics_path: /metrics
- job_name: 'caddy'
static_configs:
- targets: ['caddy:2019']
scrape_interval: 5s
metrics_path: /metrics
- job_name: 'crowdsec'
static_configs:
- targets: ['crowdsec:6060']
scrape_interval: 30s
metrics_path: /metrics
- job_name: 'loki'
static_configs:
- targets: ['loki:3100']
scrape_interval: 15s
metrics_path: /metrics