Skip to content

Commit

Permalink
Improve prometheus remote_write docs (#17384)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrsMark authored Apr 21, 2020
1 parent 0765f94 commit 0eb1bd3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions metricbeat/module/prometheus/remote_write/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ remote_write:
- url: "http://localhost:9201/write"
------------------------------------------------------------------------------


TIP: In order to assure the health of the whole queue, the following two configuration
https://prometheus.io/docs/practices/remote_write/#parameters[parameters] should be considered:

- `max_shards`: Sets the maximum number of paralelism with which Prometheus will try to send samples to Metricbeat.
It is recommended that this setting should be equal to the number of cores of the machine where Metricbeat runs.
Metricbeat can handle connections in parallel and hence setting `max_shards` to the number of parallelism that
Metricbeat can actually achieve is the optimal queue configuration.
- `max_samples_per_send`: Sets the number of samples to batch together for each send. Recommended values are
between 100 (default) and 1000. Having a bigger batch can lead to improved throughput and in more efficient
storage since Metricbeat groups metrics with the same labels into same event documents.
However this will increase the memory usage of Metricbeat.
- `capacity`: It is recommended to set capacity to 3-5 times `max_samples_per_send`.
Capacity sets the number of samples that are queued in memory per shard, and hence capacity should be high enough so as to
be able to cover `max_samples_per_send`.
Metrics sent to the http endpoint will be put by default under the `prometheus.metrics` prefix with their labels under `prometheus.labels`.
A basic configuration would look like:

Expand Down

0 comments on commit 0eb1bd3

Please sign in to comment.