1
0
mirror of git://f0xx.org/ac/ac-deploy synced 2026-07-29 02:57:38 +03:00

added 'monitoring' path - ask devs why it's there

This commit is contained in:
Anton Afanasyeu
2026-06-28 22:01:59 +02:00
parent 3c5233c903
commit 2b2c32cff5
13 changed files with 1146 additions and 0 deletions

View File

@@ -0,0 +1,105 @@
# Prometheus main config — cast04 (10.7.16.239)
# Track A monitoring SPEC: ac-docs/specs/20260626_cluster_monitoring.md
# Generated: 2026-06-26
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 (BE/MariaDB)
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 (internal BE; FE port 443 unreachable from cluster) ─
# External HTTPS availability → UptimeRobot (SaaS external probe)
- job_name: 'blackbox_http'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- 'http://10.7.16.128/app/androidcast_project/' # BE main app
- 'http://10.7.16.128/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'
# TCP probes removed: MariaDB uses skip-networking (socket only), PostgreSQL binds loopback only.
# Database health is covered by mysqld_exporter (job: mysqld) and postgres_exporter (job: postgres).
# ── MariaDB exporter (artc0) ─────────────────────────────────────────────────
- job_name: 'mysqld'
static_configs:
- targets: ['10.7.16.128:9104']
labels:
instance: 'artc0-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'