In diesem Artikel erklĂ€rt mein Kollege Luca Carboni, DevOps Engineer von Miros BĂŒro in Amsterdam, wie unsere Metrikspeicherinfrastruktur aussieht. Alle darin enthaltenen Komponenten entsprechen den GrundsĂ€tzen der HochverfĂŒgbarkeit und Fehlertoleranz, sind eindeutig spezialisiert, können Daten ĂŒber einen langen Zeitraum speichern und sind hinsichtlich der Kosten optimal.
Der fragliche Stapel: Prometheus, Alertmanager, Pushgateway, Blackbox-Exporteur, Grafana und VictoriaMetrics.

HochverfĂŒgbarkeit und Fehlertoleranz fĂŒr Prometheus konfigurieren
Prometheus federation, Prometheus. , Grafana : , - .
, . , Prometheus , .
, . (prometheus.yml) , . A B .
. IaC ( ) Terraform (CM) Ansible, . , . , .Alertmanager, Pushgateway, Blackbox,
.
Alertmanager , Prometheus Alertmanager, . Alertmanager , : Prometheus A Prometheus B. IaC CM, Alertmanager .
- , . , â Prometheus A Prometheus B .
Pushgateway , . . Pushgateway DNS Failover , ( active/passive). , .
Blackbox Prometheus A Prometheus B.
, Prometheus, Alertmanager, , Pushgateway active/passive Blackbox. .

. VPC (Virtual Private Cloud), , . . , . â . , , .
Prometheus, , . , . . " , ".
VictoriaMetrics
Prometheus . Prometheus , . . 10 . , ? , â . Prometheus , - , .
Cortex, Thanos, M3DB, VictoriaMetrics . Prometheus, â , , â .
VictoriaMetrics : «--» (single-node version) (cluster version). , , . , .
â . (), .
VictoriaMetrics : vmstorage ( ), vminsert ( ) vmselect ( ). , vminsert vmselect .
vminsert . , , . vminsert (stateless), , , .
, vminsert â (storageNode) , (replicationFactor=N, N â vmstorage). vminsert? Prometheus, remote_write.
vmstorage â , VictoriaMetrics. vminsert vmselect, vmstorage (stateful), . vmstorage , (IO latency) (IOPS), , Prometheus.
vmstorage:
storageDataPath â , ;
retentionPeriod â ;
dedup.minScrapeInterval â ( , ).
vmstorage , replicationFactor, vminsert, (N) .
vmstorage , , , vmstorage .
vmselect . , , . , Prometheus, , . , , Grafana. vminsert, vmselect .

Grafana
Grafana , Prometheus, , VictoriaMetrics. , VictoriaMetrics (MetricsQL) PromQL, Prometheus. Grafana.
Grafana SQLite . SQLite , , . . , PostgreSQL Amazon RDS, Multi-AZ , .
Grafana PostgreSQL. , Grafana . PostgreSQL Grafana, , vendor lock. , .
, Grafana. .
Grafana VictoriaMetrics â , vmselect, â Prometheus . .

***
, , . , vmstorage , Amazon S3.
, . , .
:
Prometheus â https://prometheus.io/
Alertmanager â https://github.com/prometheus/alertmanager
Pushgateway â https://github.com/prometheus/pushgateway
Blackbox exporter â https://github.com/prometheus/blackbox_exporter
â https://prometheus.io/docs/instrumenting/exporters/
Grafana â https://grafana.com/
VictoriaMetrics â https://victoriametrics.com/