Merge pull request #392 from prometheus/mr/update-scenarios

Update transition scenarios
This commit is contained in:
Matthias Rampke 2021-09-01 17:51:24 +02:00 committed by GitHub
commit f39c9c3645
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,26 +8,38 @@
## Overview ## Overview
### With StatsD The StatsD exporter is a drop-in replacement for StatsD.
This exporter translates StatsD metrics to Prometheus metrics via configured mapping rules.
To pipe metrics from an existing StatsD environment into Prometheus, configure We recommend using the exporter only as an intermediate solution, and switching to [native Prometheus instrumentation](http://prometheus.io/docs/instrumenting/clientlibs/) in the long term.
StatsD's repeater backend to repeat all received metrics to a `statsd_exporter` While it is common to run centralized StatsD servers, the exporter works best as a [sidecar](https://docs.microsoft.com/en-us/azure/architecture/patterns/sidecar).
process. This exporter translates StatsD metrics to Prometheus metrics via
configured mapping rules. ### Transitioning from an existing StatsD setup
The relay feature allows for a gradual transition.
Introduce the exporter by adding it as a sidecar alongside the application instances.
In Kubernetes, this means adding it to the [pod](https://kubernetes.io/docs/concepts/workloads/pods/).
Use the `--statsd.relay.address` to forward metrics to your existing StatsD UDP endpoint.
Relaying forwards statsd events unmodified, preserving the original metric name and tags in any format.
+-------------+ +----------+ +------------+
| Application +--->| Exporter +----------------->| StatsD |
+-------------+ +----------+ +------------+
^
| +------------+
+----------------------+ Prometheus |
+------------+
### Relaying from StatsD
To pipe metrics from an existing StatsD environment into Prometheus, configure StatsD's repeater backend to repeat all received metrics to a `statsd_exporter` process.
+----------+ +-------------------+ +--------------+ +----------+ +-------------------+ +--------------+
| StatsD |---(UDP/TCP repeater)--->| statsd_exporter |<---(scrape /metrics)---| Prometheus | | StatsD |---(UDP/TCP repeater)--->| statsd_exporter |<---(scrape /metrics)---| Prometheus |
+----------+ +-------------------+ +--------------+ +----------+ +-------------------+ +--------------+
### Without StatsD This allows trying out the exporter with minimal effort, but does not provide the per-instance metrics of the sidecar pattern.
Since the StatsD exporter uses the same line protocol as StatsD itself, you can
also configure your applications to send StatsD metrics directly to the exporter.
In that case, you don't need to run a StatsD server anymore.
We recommend this only as an intermediate solution and recommend switching to
[native Prometheus instrumentation](http://prometheus.io/docs/instrumenting/clientlibs/)
in the long term.
### Tagging Extensions ### Tagging Extensions