1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/monitoring-example-remote-write-queue-configuration.adoc

69 lines
2.7 KiB
Plaintext

// Module included in the following assemblies:
//
// * observability/monitoring/configuring-the-monitoring-stack.adoc
:_mod-docs-content-type: REFERENCE
[id="example-remote-write-queue-configuration_{context}"]
= Example remote write queue configuration
// Set attributes to distinguish between cluster monitoring examples and user workload monitoring examples.
ifndef::openshift-dedicated,openshift-rosa[]
:configmap-name: cluster-monitoring-config
:namespace-name: openshift-monitoring
:prometheus-instance: prometheusK8s
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
:configmap-name: user-workload-monitoring-config
:namespace-name: openshift-user-workload-monitoring
:prometheus-instance: prometheus
endif::openshift-dedicated,openshift-rosa[]
You can use the `queueConfig` object for remote write to tune the remote write queue parameters. The following example shows the queue parameters with their default values for
ifndef::openshift-dedicated,openshift-rosa[]
default platform monitoring
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
monitoring for user-defined projects
endif::openshift-dedicated,openshift-rosa[]
in the `{namespace-name}` namespace.
.Example configuration of remote write parameters with default values
[source,yaml,subs="attributes+"]
----
apiVersion: v1
kind: ConfigMap
metadata:
name: {configmap-name}
namespace: {namespace-name}
data:
config.yaml: |
{prometheus-instance}:
remoteWrite:
- url: "https://remote-write-endpoint.example.com"
<endpoint_authentication_credentials>
queueConfig:
capacity: 10000 #<1>
minShards: 1 #<2>
maxShards: 50 #<3>
maxSamplesPerSend: 2000 #<4>
batchSendDeadline: 5s #<5>
minBackoff: 30ms #<6>
maxBackoff: 5s #<7>
retryOnRateLimit: false #<8>
sampleAgeLimit: 0s #<9>
----
<1> The number of samples to buffer per shard before they are dropped from the queue.
<2> The minimum number of shards.
<3> The maximum number of shards.
<4> The maximum number of samples per send.
<5> The maximum time for a sample to wait in buffer.
<6> The initial time to wait before retrying a failed request. The time gets doubled for every retry up to the `maxbackoff` time.
<7> The maximum time to wait before retrying a failed request.
<8> Set this parameter to `true` to retry a request after receiving a 429 status code from the remote write storage.
<9> The samples that are older than the `sampleAgeLimit` limit are dropped from the queue. If the value is undefined or set to `0s`, the parameter is ignored.
// Unset the source code block attributes just to be safe.
:!namespace-name:
:!prometheus-instance: