PrometheusおよびVictoriaMetrics:回復力のあるメトリクスストレージインフラストラクチャ

この記事では、MiroのアムステルダムオフィスのDevOpsエンジニアである同僚のLuca Carboniが、メトリックストレージインフラストラクチャがどのように見えるかを説明します。その中のすべてのコンポーネントは、高可用性(High Availability)と障害耐性(Fault Tolerance)の原則に準拠し、明確な専門性を持ち、データを長期間保存でき、コストの観点から最適です。





問題のスタック:Prometheus、Alertmanager、Pushgateway、Blackboxエクスポーター、Grafana、VictoriaMetrics。





Prometheusの高可用性と耐障害性の構成

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.





VictoriaMetrics : «--» (single-node version) (cluster version). , , . , .





— . (), .





VictoriaMetrics : vmstorage ( ), vminsert ( ) vmselect ( ). , vminsert vmselect .





vminsert . , , . vminsert (stateless), , , .





, vminsert — (storageNode) , (replicationFactor=N, Nvmstorage). 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/









Miro.












All Articles