syntaxis/config/monitoring/prometheus.yml
Jesús Pérez 9cef9b8d57 refactor: consolidate configuration directories
Merge _configs/ into config/ for single configuration directory.
Update all path references.

Changes:
- Move _configs/* to config/
- Update .gitignore for new patterns
- No code references to _configs/ found

Impact: -1 root directory (layout_conventions.md compliance)
2025-12-26 18:36:23 +00:00

66 lines
1.6 KiB
YAML

global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
environment: 'production'
service: 'project-lifecycle'
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
- localhost:9093
# Load rules once and periodically evaluate them
rule_files:
- /etc/prometheus/rules/*.yml
# Scrape configurations
scrape_configs:
# Prometheus self-monitoring
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
# API Server metrics
- job_name: 'lifecycle-api'
static_configs:
- targets: ['localhost:3000']
metrics_path: '/metrics'
scrape_interval: 10s
scrape_timeout: 5s
relabel_configs:
- source_labels: [__address__]
target_label: instance
# Dashboard Server metrics
- job_name: 'lifecycle-dashboard'
static_configs:
- targets: ['localhost:3001']
metrics_path: '/metrics'
scrape_interval: 10s
scrape_timeout: 5s
# NATS JetStream metrics
- job_name: 'nats'
static_configs:
- targets: ['localhost:8222']
metrics_path: '/metrics'
scrape_interval: 15s
# Node Exporter metrics (if available)
- job_name: 'node'
static_configs:
- targets: ['localhost:9100']
scrape_interval: 15s
# Kubernetes API Server (if running in K8s)
- job_name: 'kubernetes-apiservers'
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
static_configs:
- targets: ['kubernetes.default.svc.cluster.local:443']