Files
metabuilder/deployment/config/prometheus/prometheus.yml
johndoe6345789 2af4d04ab8 feat(deployment): Add comprehensive deployment components and scripts
- Introduced `README_ADDITIONS.md` for new services and features including CLI tools, system bootstrap, monitoring stack, and backup automation.
- Created Dockerfiles for CLI and admin tools, enabling standalone usage and administrative tasks.
- Implemented `docker-compose.monitoring.yml` for Prometheus, Grafana, Loki, and related services for monitoring and observability.
- Added `backup-database.sh` for automated PostgreSQL backups with retention policies.
- Developed `bootstrap-system.sh` for initializing the system, running migrations, and seeding the database.
- Updated `deploy.sh` for streamlined deployment across development, production, and monitoring environments.
- Configured Prometheus and Grafana with appropriate datasource and scrape configurations.
- Enhanced directory structure for better organization of deployment files and scripts.
2026-01-03 19:33:05 +00:00

112 lines
2.6 KiB
YAML

# Prometheus Configuration
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
cluster: 'metabuilder'
environment: '${ENVIRONMENT:-production}'
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
- alertmanager:9093
# Load alerting rules
rule_files:
- /etc/prometheus/alerts.yml
# Scrape configurations
scrape_configs:
# Prometheus itself
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
# MetaBuilder Application
- job_name: 'metabuilder-app'
metrics_path: '/api/metrics'
static_configs:
- targets: ['metabuilder-app:3000']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'metabuilder-app'
# DBAL Daemon
- job_name: 'dbal-daemon'
metrics_path: '/metrics'
static_configs:
- targets: ['dbal-daemon:8080']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'dbal-daemon'
# Media Daemon
- job_name: 'media-daemon'
metrics_path: '/metrics'
static_configs:
- targets: ['media-daemon:8090']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'media-daemon'
# PostgreSQL
- job_name: 'postgres'
static_configs:
- targets: ['postgres-exporter:9187']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'postgres'
# Redis
- job_name: 'redis'
static_configs:
- targets: ['redis-exporter:9121']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'redis'
# Node Exporter (Host metrics)
- job_name: 'node'
static_configs:
- targets: ['node-exporter:9100']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'host'
# cAdvisor (Container metrics)
- job_name: 'cadvisor'
static_configs:
- targets: ['cadvisor:8080']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'containers'
# Nginx
- job_name: 'nginx'
metrics_path: '/metrics'
static_configs:
- targets: ['nginx:80']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'nginx'
# Icecast
- job_name: 'icecast'
metrics_path: '/status-json.xsl'
static_configs:
- targets: ['icecast:8000']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'icecast'