1
0
mirror of git://f0xx.org/ac/ac-deploy synced 2026-07-29 04:38:48 +03:00
Files
ac-deploy/monitoring/cast04/prometheus.yml
Anton Afanasyeu 386f7ab793 monitoring: fix mysqld target to cast01, add external blackbox probe
- Move mysqld_exporter target from artc0 (obsolete) to cast01:9104
- Add https://apps.f0xx.org/ as external blackbox HTTP probe
- Comment artc0 as legacy/monitoring-only node

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 22:34:12 +02:00

103 lines
3.8 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)
- '10.7.16.128:9100' # artc0 (legacy, monitoring only)
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'
- source_labels: [__address__]
regex: '(10\.7\.16\.128):.*'
target_label: instance
replacement: 'artc0'
# ── blackbox_exporter — HTTP probes ─────────────────────────────────────────
- 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
- 'https://apps.f0xx.org/app/androidcast_project/' # external FE probe
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'