Skip to content

Commit 6ef178a

Browse files
authored
Merge pull request #80449 from eromanova97/OBSDOCS-270
OBSDOCS-270: Reference doc for remote write configuration isn't exhau…
2 parents f4f1992 + c28a737 commit 6ef178a

6 files changed

+96
-27
lines changed

modules/monitoring-configuring-remote-write-storage.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
// * observability/monitoring/configuring-the-monitoring-stack.adoc
44

55
:_mod-docs-content-type: PROCEDURE
6-
[id="configuring_remote_write_storage_{context}"]
6+
[id="configuring-remote-write-storage_{context}"]
77
= Configuring remote write storage
88

9-
[role="_abstract"]
109
You can configure remote write storage to enable Prometheus to send ingested metrics to remote systems for long-term storage. Doing so has no impact on how or for how long Prometheus stores metrics.
1110

1211
.Prerequisites

modules/monitoring-example-remote-write-authentication-settings.adoc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ monitoring user-defined projects
2727
endif::openshift-dedicated,openshift-rosa[]
2828
in the `{namespace-name}` namespace.
2929

30-
.Sample YAML for AWS Signature Version 4 authentication
31-
====
30+
[id="remote-write-sample-yaml-aws-sigv4_{context}"]
31+
== Sample YAML for AWS Signature Version 4 authentication
32+
3233
The following shows the settings for a `sigv4` secret named `sigv4-credentials` in the `{namespace-name}` namespace.
3334

3435
[source,yaml,subs="attributes+"]
@@ -77,11 +78,11 @@ data:
7778
<4> The key that contains the AWS API secret key in the specified `Secret` object.
7879
<5> The name of the AWS profile that is being used to authenticate.
7980
<6> The unique identifier for the Amazon Resource Name (ARN) assigned to your role.
80-
====
8181

82-
.Sample YAML for basic authentication
83-
====
84-
The following shows sample basic authentication settings for a `Secret` object named `rw-basic-auth` in the `{namespace-name}` namespace:
82+
[id="remote-write-sample-yaml-basic-auth_{context}"]
83+
== Sample YAML for Basic authentication
84+
85+
The following shows sample Basic authentication settings for a `Secret` object named `rw-basic-auth` in the `{namespace-name}` namespace:
8586

8687
[source,yaml,subs="attributes+"]
8788
----
@@ -124,10 +125,10 @@ data:
124125
<1> The name of the `Secret` object that contains the authentication credentials.
125126
<2> The key that contains the username in the specified `Secret` object.
126127
<3> The key that contains the password in the specified `Secret` object.
127-
====
128128

129-
.Sample YAML for authentication with a bearer token using a `Secret` Object
130-
====
129+
[id="remote-write-sample-yaml-bearer-token_{context}"]
130+
== Sample YAML for authentication with a bearer token using a `Secret` Object
131+
131132
The following shows bearer token settings for a `Secret` object named `rw-bearer-auth` in the `{namespace-name}` namespace:
132133

133134
[source,yaml,subs="attributes+"]
@@ -167,10 +168,10 @@ data:
167168
<1> The authentication type of the request. The default value is `Bearer`.
168169
<2> The name of the `Secret` object that contains the authentication credentials.
169170
<3> The key that contains the authentication token in the specified `Secret` object.
170-
====
171171

172-
.Sample YAML for OAuth 2.0 authentication
173-
====
172+
[id="remote-write-sample-yaml-oauth-20_{context}"]
173+
== Sample YAML for OAuth 2.0 authentication
174+
174175
The following shows sample OAuth 2.0 settings for a `Secret` object named `oauth2-credentials` in the `{namespace-name}` namespace:
175176

176177
[source,yaml,subs="attributes+"]
@@ -223,10 +224,10 @@ data:
223224
<3> The URL used to fetch a token with the specified `clientId` and `clientSecret`.
224225
<4> The OAuth 2.0 scopes for the authorization request. These scopes limit what data the tokens can access.
225226
<5> The OAuth 2.0 authorization request parameters required for the authorization server.
226-
====
227227

228-
.Sample YAML for TLS client authentication
229-
====
228+
[id="remote-write-sample-yaml-tls_{context}"]
229+
== Sample YAML for TLS client authentication
230+
230231
The following shows sample TLS client settings for a `tls` `Secret` object named `mtls-bundle` in the `{namespace-name}` namespace.
231232

232233
[source,yaml,subs="attributes+"]
@@ -277,7 +278,6 @@ data:
277278
<2> The key in the specified `Secret` object that contains the CA certificate for the endpoint.
278279
<3> The key in the specified `Secret` object that contains the client certificate for the endpoint.
279280
<4> The key in the specified `Secret` object that contains the client key secret.
280-
====
281281

282282
// Unset the source code block attributes just to be safe.
283283
:!namespace-name:
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * observability/monitoring/configuring-the-monitoring-stack.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
[id="example-remote-write-queue-configuration_{context}"]
7+
= Example remote write queue configuration
8+
9+
// Set attributes to distinguish between cluster monitoring examples and user workload monitoring examples.
10+
ifndef::openshift-dedicated,openshift-rosa[]
11+
:configmap-name: cluster-monitoring-config
12+
:namespace-name: openshift-monitoring
13+
:prometheus-instance: prometheusK8s
14+
endif::openshift-dedicated,openshift-rosa[]
15+
ifdef::openshift-dedicated,openshift-rosa[]
16+
:configmap-name: user-workload-monitoring-config
17+
:namespace-name: openshift-user-workload-monitoring
18+
:prometheus-instance: prometheus
19+
endif::openshift-dedicated,openshift-rosa[]
20+
21+
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
22+
ifndef::openshift-dedicated,openshift-rosa[]
23+
default platform monitoring
24+
endif::openshift-dedicated,openshift-rosa[]
25+
ifdef::openshift-dedicated,openshift-rosa[]
26+
monitoring for user-defined projects
27+
endif::openshift-dedicated,openshift-rosa[]
28+
in the `{namespace-name}` namespace.
29+
30+
.Example configuration of remote write parameters with default values
31+
[source,yaml,subs="attributes+"]
32+
----
33+
apiVersion: v1
34+
kind: ConfigMap
35+
metadata:
36+
name: {configmap-name}
37+
namespace: {namespace-name}
38+
data:
39+
config.yaml: |
40+
{prometheus-instance}:
41+
remoteWrite:
42+
- url: "https://remote-write-endpoint.example.com"
43+
<endpoint_authentication_credentials>
44+
queueConfig:
45+
capacity: 10000 #<1>
46+
minShards: 1 #<2>
47+
maxShards: 50 #<3>
48+
maxSamplesPerSend: 2000 #<4>
49+
batchSendDeadline: 5s #<5>
50+
minBackoff: 30ms #<6>
51+
maxBackoff: 5s #<7>
52+
retryOnRateLimit: false #<8>
53+
sampleAgeLimit: 0s #<9>
54+
----
55+
<1> The number of samples to buffer per shard before they are dropped from the queue.
56+
<2> The minimum number of shards.
57+
<3> The maximum number of shards.
58+
<4> The maximum number of samples per send.
59+
<5> The maximum time for a sample to wait in buffer.
60+
<6> The initial time to wait before retrying a failed request. The time gets doubled for every retry up to the `maxbackoff` time.
61+
<7> The maximum time to wait before retrying a failed request.
62+
<8> Set this parameter to `true` to retry a request after receiving a 429 status code from the remote write storage.
63+
<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.
64+
65+
// Unset the source code block attributes just to be safe.
66+
:!namespace-name:
67+
:!prometheus-instance:
68+

observability/monitoring/accessing-third-party-monitoring-apis.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ include::modules/monitoring-resources-reference-for-the-cluster-monitoring-opera
4444
ifndef::openshift-dedicated,openshift-rosa[]
4545
* xref:../../observability/monitoring/enabling-monitoring-for-user-defined-projects.adoc#enabling-monitoring-for-user-defined-projects_enabling-monitoring-for-user-defined-projects[Enabling monitoring for user-defined projects]
4646
endif::openshift-dedicated,openshift-rosa[]
47-
* xref:../../observability/monitoring/configuring-the-monitoring-stack.adoc#configuring_remote_write_storage_configuring-the-monitoring-stack[Configuring remote write storage]
47+
* xref:../../observability/monitoring/configuring-the-monitoring-stack.adoc#configuring-remote-write-storage_configuring-the-monitoring-stack[Configuring remote write storage]
4848
* xref:../../observability/monitoring/managing-metrics.adoc#managing-metrics[Managing metrics]
4949
* xref:../../observability/monitoring/managing-alerts.adoc#managing-alerts[Managing alerts]

observability/monitoring/common-monitoring-configuration-scenarios.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Specify the metrics data retention parameters for Prometheus and Thanos Ruler.
3939
* By default, in a newly installed {product-title} system, the monitoring `ClusterOperator` resource reports a `PrometheusDataPersistenceNotConfigured` status message to remind you that storage is not configured.
4040
====
4141
+
42-
* For longer term data retention, xref:../../observability/monitoring/configuring-the-monitoring-stack.adoc#configuring_remote_write_storage_configuring-the-monitoring-stack[configure the remote write feature] to enable Prometheus to send ingested metrics to remote systems for storage.
42+
* For longer term data retention, xref:../../observability/monitoring/configuring-the-monitoring-stack.adoc#configuring-remote-write-storage_configuring-the-monitoring-stack[configure the remote write feature] to enable Prometheus to send ingested metrics to remote systems for storage.
4343
+
4444
[IMPORTANT]
4545
====

observability/monitoring/configuring-the-monitoring-stack.adoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,18 @@ endif::openshift-dedicated,openshift-rosa[]
204204
include::modules/monitoring-configuring-remote-write-storage.adoc[leveloffset=+1]
205205
include::modules/monitoring-supported-remote-write-authentication-settings.adoc[leveloffset=+2]
206206
include::modules/monitoring-example-remote-write-authentication-settings.adoc[leveloffset=+2]
207+
include::modules/monitoring-example-remote-write-queue-configuration.adoc[leveloffset=+2]
207208

208209
[role="_additional-resources"]
209210
.Additional resources
210-
211-
* See link:https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage[Setting up remote write compatible endpoints] for steps to create a remote write compatible endpoint (such as Thanos).
212-
* See link:https://prometheus.io/docs/practices/remote_write/#remote-write-tuning[Tuning remote write settings] for information about how to optimize remote write settings for different use cases.
211+
ifndef::openshift-dedicated,openshift-rosa[]
212+
* xref:../../rest_api/monitoring_apis/prometheus-monitoring-coreos-com-v1.adoc#spec-remotewrite-2[Prometheus REST API reference for remote write]
213+
endif::openshift-dedicated,openshift-rosa[]
214+
* link:https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage[Setting up remote write compatible endpoints] (Prometheus documentation)
215+
* link:https://prometheus.io/docs/practices/remote_write/#remote-write-tuning[Tuning remote write settings] (Prometheus documentation)
213216
ifndef::openshift-dedicated,openshift-rosa[]
214217
// This xref might be relevant for ROSA/OSD if this content is reused:
215-
* See xref:../../nodes/pods/nodes-pods-secrets.adoc#nodes-pods-secrets-about_nodes-pods-secrets[Understanding secrets] for steps to create and configure `Secret` objects in {product-title}.
216-
* See the xref:../../rest_api/monitoring_apis/prometheus-monitoring-coreos-com-v1.adoc#spec-remotewrite-2[Prometheus REST API reference for remote write] for information about additional optional fields.
218+
* xref:../../nodes/pods/nodes-pods-secrets.adoc#nodes-pods-secrets-about_nodes-pods-secrets[Understanding secrets]
217219
endif::openshift-dedicated,openshift-rosa[]
218220

219221
// Configuring labels for outgoing metrics
@@ -223,9 +225,9 @@ include::modules/monitoring-creating-cluster-id-labels-for-metrics.adoc[leveloff
223225
[role="_additional-resources"]
224226
.Additional resources
225227

226-
* For details about write relabel configuration, see xref:../../observability/monitoring/configuring-the-monitoring-stack.adoc#configuring_remote_write_storage_configuring-the-monitoring-stack[Configuring remote write storage].
228+
* xref:../../observability/monitoring/configuring-the-monitoring-stack.adoc#configuring-remote-write-storage_configuring-the-monitoring-stack[Configuring remote write storage]
227229
ifndef::openshift-dedicated,openshift-rosa[]
228-
* For information about how to get your cluster ID, see xref:../../support/gathering-cluster-data.adoc#support-get-cluster-id_gathering-cluster-data[Obtaining your cluster ID].
230+
* xref:../../support/gathering-cluster-data.adoc#support-get-cluster-id_gathering-cluster-data[Obtaining your cluster ID]
229231
endif::openshift-dedicated,openshift-rosa[]
230232

231233
ifndef::openshift-dedicated,openshift-rosa[]

0 commit comments

Comments
 (0)