sighupio / fury-distribution

Kubernetes Fury Distribution (Core Modules) - A battle-tested open-source Kubernetes distribution
https://kubernetesfury.com/
BSD 3-Clause "New" or "Revised" License
162 stars 13 forks source link

feat(monitoring): add remoteWrite to Prometheus and Prometheus Agent mode #228

Closed ralgozino closed 3 months ago

ralgozino commented 4 months ago

Intro

This is a set of changes that allow the monitoring stack to be configured to send metrics to a remote Prometheus receiver, both with our current Prometheus monitoring type and with a new PrometheusAgent type that deploys a more minimal Prometheus installation only for scraping and sending metrics.

Prometheus Agent mode

The Agent mode optimizes Prometheus for the remote write use case. It disables querying, alerting, and local storage, and replaces it with a customized TSDB WAL. Everything else stays the same: scraping logic, service discovery and related configuration. It can be used as a drop-in replacement for Prometheus if you want to just forward your data to a remote Prometheus server or any other Remote-Write-compliant project.

Notice that with Agent mode:

If any of the previous points is a blocker for a particular use-case, say you want to be able to see resources usage with kubectl top, you can fallback to the regular prometheus monitoring type and configure the remoteWrite section setting a low retention to minimise resource usage instead of using the prometheusAgent type.

Changes in this PR

Refs

fixes https://github.com/sighupio/product-management/issues/484