mirror of
https://github.com/hanzoai/commerce.git
synced 2026-10-30 15:08:42 +00:00
Multi-tenant commerce and billing: orders, subscriptions, invoices, plans, usage metering and a credit ledger. One Go binary. MIT OR Apache-2.0. Claude-Session: https://claude.ai/code/session_01SAtaDFm8VDiWrhYHNNtxMw
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
# Hanzo Commerce - Prometheus Configuration
|
|
|
|
global:
|
|
scrape_interval: 15s
|
|
evaluation_interval: 15s
|
|
external_labels:
|
|
monitor: 'commerce'
|
|
environment: '${ENV:-staging}'
|
|
|
|
# Alertmanager configuration (optional)
|
|
# alerting:
|
|
# alertmanagers:
|
|
# - static_configs:
|
|
# - targets:
|
|
# - alertmanager:9093
|
|
|
|
# Rule files (optional)
|
|
# rule_files:
|
|
# - "rules/*.yml"
|
|
|
|
scrape_configs:
|
|
# Prometheus self-monitoring
|
|
- job_name: 'prometheus'
|
|
static_configs:
|
|
- targets: ['localhost:9090']
|
|
|
|
# Commerce API metrics
|
|
- job_name: 'commerce'
|
|
metrics_path: /metrics
|
|
static_configs:
|
|
- targets:
|
|
- 'commerce:8001'
|
|
- 'commerce-blue:8001'
|
|
- 'commerce-green:8001'
|
|
relabel_configs:
|
|
- source_labels: [__address__]
|
|
regex: 'commerce-(\w+):.*'
|
|
target_label: deployment_color
|
|
replacement: '${1}'
|
|
|
|
# Redis metrics (via redis_exporter if deployed)
|
|
- job_name: 'redis'
|
|
static_configs:
|
|
- targets: ['redis-exporter:9121']
|
|
|
|
# Datastore metrics
|
|
- job_name: 'datastore'
|
|
static_configs:
|
|
- targets: ['datastore:9363']
|
|
|
|
# Nginx metrics (via nginx_exporter if deployed)
|
|
- job_name: 'nginx'
|
|
static_configs:
|
|
- targets: ['nginx-exporter:9113']
|
|
|
|
# Node exporter (host metrics)
|
|
- job_name: 'node'
|
|
static_configs:
|
|
- targets: ['node-exporter:9100']
|