1
0
mirror of git://f0xx.org/ac/ac-deploy synced 2026-07-29 06:17:57 +03:00
Files
ac-deploy/monitoring/cast04/prometheus.yml
Anton Afanasyeu d045653a7b fix(monitoring): drop deprecated artc0 from cast04 scrape targets
artc0 VM is off; remove node_exporter target and relabel rules from
Prometheus. Point Grafana auth-proxy whitelist and alert-notifier
shortener API at cast01–03 cluster instead of 10.7.16.128.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 17:05:55 +02:00

118 lines
4.3 KiB
YAML

# Prometheus main config — cast04 (10.7.16.239)
# Track A monitoring SPEC: ac-docs/specs/20260626_cluster_monitoring.md
# Updated: 2026-06-28 — mysqld targets moved to cast01/02/03 cluster
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
cluster: 'ac-cluster0'
monitor: 'cast04'
rule_files:
- "/etc/prometheus/rules/*.yml"
alerting:
alertmanagers:
- static_configs:
- targets: ['localhost:9093']
scrape_configs:
# ── node_exporter on all cluster nodes ──────────────────────────────────────
- job_name: 'node'
static_configs:
- targets:
- '10.7.16.236:9100' # cast01
- '10.7.16.237:9100' # cast02
- '10.7.16.238:9100' # cast03
- '10.7.16.239:9100' # cast04 (self)
labels:
env: 'production'
relabel_configs:
- source_labels: [__address__]
regex: '(10\.7\.16\.236):.*'
target_label: instance
replacement: 'cast01'
- source_labels: [__address__]
regex: '(10\.7\.16\.237):.*'
target_label: instance
replacement: 'cast02'
- source_labels: [__address__]
regex: '(10\.7\.16\.238):.*'
target_label: instance
replacement: 'cast03'
- source_labels: [__address__]
regex: '(10\.7\.16\.239):.*'
target_label: instance
replacement: 'cast04'
# ── blackbox_exporter — internal HTTP probes (no TLS issues) ────────────────
- job_name: 'blackbox_http'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- 'http://10.7.16.236/app/androidcast_project/' # BE main app (cast01)
- 'http://10.7.16.236/app/androidcast_project/issues/' # crash reporter
- 'http://10.7.16.239:3000/api/health' # Grafana health
labels:
env: 'production'
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 'localhost:9115'
# ── blackbox_exporter — external HTTPS probes (self-signed cert on FE) ──────
# Uses insecure_skip_verify until a valid LE cert is deployed on apps.f0xx.org
# TODO: switch back to http_2xx once cert is fixed (FE monstro: certbot --nginx)
- job_name: 'blackbox_https_external'
metrics_path: /probe
params:
module: [http_2xx_insecure]
static_configs:
- targets:
- 'https://apps.f0xx.org/app/androidcast_project/' # external FE (self-signed cert)
# notify.f0xx.org: add here once FE nginx proxies notify.f0xx.org → cluster
labels:
env: 'production'
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 'localhost:9115'
# ── MariaDB exporter — cast01 (primary) ────────────────────────────────────
- job_name: 'mysqld'
static_configs:
- targets: ['10.7.16.236:9104']
labels:
instance: 'cast01-mariadb'
# ── PostgreSQL exporter (cast01) ─────────────────────────────────────────────
- job_name: 'postgres'
static_configs:
- targets: ['10.7.16.236:9187']
labels:
instance: 'cast01-postgres'
# ── prometheus self-scrape ───────────────────────────────────────────────────
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
labels:
instance: 'cast04-prometheus'
# ── alertmanager self-scrape ─────────────────────────────────────────────────
- job_name: 'alertmanager'
static_configs:
- targets: ['localhost:9093']
labels:
instance: 'cast04-alertmanager'