forked from Nova-reward/Nova-Rewards
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprometheus.yml
More file actions
89 lines (79 loc) · 2.32 KB
/
Copy pathprometheus.yml
File metadata and controls
89 lines (79 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
cluster: 'nova-rewards'
environment: '${ENVIRONMENT:-production}'
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
- alertmanager: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']
# Nova Rewards Backend API
- job_name: 'nova-backend'
metrics_path: '/metrics'
static_configs:
- targets: ['backend:4000']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'nova-backend'
# Node Exporter for system metrics
- job_name: 'node-exporter'
static_configs:
- targets: ['node-exporter:9100']
# PostgreSQL Exporter
- job_name: 'postgres'
static_configs:
- targets: ['postgres-exporter:9187']
# Redis Exporter
- job_name: 'redis'
static_configs:
- targets: ['redis-exporter:9121']
# Nginx Exporter
- job_name: 'nginx'
static_configs:
- targets: ['nginx-exporter:9113']
# Blackbox Exporter for endpoint monitoring
- job_name: 'blackbox'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- http://backend:4000/health
- http://backend:4000/api/leaderboard
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
# Uptime monitoring — public-facing endpoints (SLA tracking, #632)
- job_name: 'blackbox-uptime'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- ${API_HEALTH_URL:-http://backend:4000/health}
- ${FRONTEND_URL:-http://frontend:3000}
- ${STELLAR_RPC_URL:-https://horizon-testnet.stellar.org}
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115