fix:
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Prometheus configuration for Meldestelle project
|
||||
# Basic configuration to enable service monitoring
|
||||
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
evaluation_interval: 15s
|
||||
|
||||
# Alertmanager configuration
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- static_configs:
|
||||
- targets:
|
||||
- "alertmanager:9093"
|
||||
|
||||
rule_files:
|
||||
- "/etc/prometheus/rules/alerts.yaml"
|
||||
|
||||
scrape_configs:
|
||||
# Job 1: Prometheus überwacht sich selbst
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: [ 'localhost:9090' ]
|
||||
|
||||
# Job 2: API Gateway (Spring Boot Actuator)
|
||||
- job_name: 'api-gateway'
|
||||
metrics_path: '/actuator/prometheus'
|
||||
scrape_interval: "30s"
|
||||
static_configs:
|
||||
- targets: [ 'api-gateway:8081' ]
|
||||
|
||||
# Job 3: Postgres (ACHTUNG)
|
||||
# Postgres direkt auf 5432 zu scrapen geht nicht.
|
||||
# Entweder auskommentieren oder 'postgres-exporter' Container hinzufügen.
|
||||
# - job_name: 'postgres-exporter'
|
||||
# static_configs:
|
||||
# - targets: ['postgres-exporter:9187']
|
||||
|
||||
# Add consul for service discovery monitoring
|
||||
- job_name: 'consul'
|
||||
metrics_path: '/v1/agent/metrics'
|
||||
params:
|
||||
format: [ 'prometheus' ]
|
||||
static_configs:
|
||||
- targets: [ 'consul:8500' ]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user