-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprometheus.yml
More file actions
51 lines (44 loc) · 1.72 KB
/
prometheus.yml
File metadata and controls
51 lines (44 loc) · 1.72 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
# Prometheus configuration for Actual Budget REST API
#
# This configuration file is used to scrape metrics from the Actual Budget REST API.
# The API exposes metrics at the /v2/metrics/prometheus endpoint in Prometheus format.
#
# Usage:
# 1. Copy this file to your Prometheus configuration directory
# 2. Update the target URL if your API is running on a different host/port
# 3. Restart Prometheus to load the new configuration
#
# For Docker Compose:
# Mount this file to /etc/prometheus/prometheus.yml in the Prometheus container
# Example: ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
global:
scrape_interval: 15s # How often to scrape targets
evaluation_interval: 15s # How often to evaluate rules
external_labels:
monitor: 'actual-budget-api'
environment: 'development' # Change to 'production' for production deployments
# Alertmanager configuration (optional)
# alerting:
# alertmanagers:
# - static_configs:
# - targets:
# # - alertmanager:9093
# Load rules once and periodically evaluate them (optional)
# rule_files:
# # - "first_rules.yml"
# # - "second_rules.yml"
# Scrape configurations
scrape_configs:
# Scrape the Actual Budget REST API
- job_name: 'actual-rest-api-dev'
scrape_interval: 5s # More frequent scraping for API metrics
metrics_path: '/v2/metrics/prometheus'
static_configs:
- targets: ['actual-rest-api-dev:3000'] # Update hostname/port as needed
labels:
service: 'actual-rest-api-dev'
environment: 'development' # Change to 'production' for production deployments
# Optional: Scrape Prometheus itself
# - job_name: 'prometheus'
# static_configs:
# - targets: ['localhost:9090']