:_mod-docs-content-type: ASSEMBLY
include::_attributes/common-attributes.adoc[]
[id="configuring-metrics"]
= Configuring metrics for core platform monitoring
:context: configuring-metrics

toc::[]

Configure the collection of metrics to monitor how cluster components and your own workloads are performing.

You can send ingested metrics to remote systems for long-term storage and add cluster ID labels to the metrics to identify the data coming from different clusters.

[role="_additional-resources"]
.Additional resources

* xref:../../../observability/monitoring/about-ocp-monitoring/key-concepts.adoc#understanding-metrics_key-concepts[Understanding metrics]

// Configuring remote write storage
include::modules/monitoring-configuring-remote-write-storage.adoc[leveloffset=+1,tags=**;CPM;!UWM]

[role="_additional-resources"]
.Additional resources

ifndef::openshift-rosa-hcp[]
* xref:../../../rest_api/monitoring_apis/prometheus-monitoring-coreos-com-v1.adoc#spec-remotewrite-writerelabelconfigs[`writeRelabelConfigs`]
endif::openshift-rosa-hcp[]
* link:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config[`relabel_config` (Prometheus documentation)]

include::modules/monitoring-supported-remote-write-authentication-settings.adoc[leveloffset=+2]

include::modules/monitoring-example-remote-write-authentication-settings.adoc[leveloffset=+2,tags=**;CPM;!UWM]

include::modules/monitoring-example-remote-write-queue-configuration.adoc[leveloffset=+2,tags=**;CPM;!UWM]

[role="_additional-resources"]
.Additional resources

ifndef::openshift-rosa-hcp[]
* xref:../../../rest_api/monitoring_apis/prometheus-monitoring-coreos-com-v1.adoc#spec-remotewrite-2[Prometheus REST API reference for remote write]
endif::openshift-rosa-hcp[]
* link:https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage[Remote write compatible endpoints (Prometheus documentation)]
* link:https://prometheus.io/docs/practices/remote_write/#remote-write-tuning[Remote write tuning (Prometheus documentation)]
* xref:../../../nodes/pods/nodes-pods-secrets.adoc#nodes-pods-secrets-about_nodes-pods-secrets[Understanding secrets]

include::modules/monitoring-table-of-remote-write-metrics.adoc[leveloffset=+2]

//Creating cluster ID labels for metrics for core platform monitoring
include::modules/monitoring-creating-cluster-id-labels-for-metrics.adoc[leveloffset=+1,tags=**;CPM;!UWM]

[role="_additional-resources"]
.Additional resources

* xref:../../../observability/monitoring/about-ocp-monitoring/key-concepts.adoc#adding-cluster-id-labels-to-metrics_key-concepts[Adding cluster ID labels to metrics]
* xref:../../../support/gathering-cluster-data.adoc#support-get-cluster-id_gathering-cluster-data[Obtaining your cluster ID]
