:_mod-docs-content-type: ASSEMBLY
include::_attributes/common-attributes.adoc[]
[id="key-concepts"]
= Understanding the monitoring stack - key concepts
:context: key-concepts

toc::[]

Get familiar with the {product-title} monitoring concepts and terms. Learn about how you can improve performance and scale of your cluster, store and record data, manage metrics and alerts, and more.

[id="about-performance-and-scalability_{context}"]
== About performance and scalability

You can optimize the performance and scale of your clusters.
You can configure the monitoring stack by performing any of the following actions:

* Control the placement and distribution of monitoring components:
** Use node selectors to move components to specific nodes.
** Assign tolerations to enable moving components to tainted nodes.
* Use pod topology spread constraints.
* Manage CPU and memory resources.
ifndef::openshift-dedicated,openshift-rosa[]
* Set the body size limit for metrics scraping.
* Use metrics collection profiles.
endif::openshift-dedicated,openshift-rosa[]

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

ifndef::openshift-dedicated,openshift-rosa[]
* xref:../../../observability/monitoring/configuring-core-platform-monitoring/configuring-performance-and-scalability.adoc#configuring-performance-and-scalability[Configuring performance and scalability for core platform monitoring]
endif::openshift-dedicated,openshift-rosa[]
* xref:../../../observability/monitoring/configuring-user-workload-monitoring/configuring-performance-and-scalability-uwm.adoc#configuring-performance-and-scalability-uwm[Configuring performance and scalability for user workload monitoring]

include::modules/monitoring-using-node-selectors-to-move-monitoring-components.adoc[leveloffset=+2]

include::modules/monitoring-using-pod-topology-spread-constraints-for-monitoring.adoc[leveloffset=+2]

include::modules/monitoring-about-specifying-limits-and-requests-for-monitoring-components.adoc[leveloffset=+2]

ifndef::openshift-dedicated,openshift-rosa[]
include::modules/monitoring-configuring-metrics-collection-profiles.adoc[leveloffset=+2]
endif::openshift-dedicated,openshift-rosa[]

[id="about-storing-and-recording-data_{context}"]
== About storing and recording data

You can store and record data to help you protect the data and use them for troubleshooting.
You can configure the monitoring stack by performing any of the following actions:

* Configure persistent storage:
** Protect your metrics and alerting data from data loss by storing them in a persistent volume (PV). As a result, they can survive pods being restarted or recreated.
** Avoid getting duplicate notifications and losing silences for alerts when the Alertmanager pods are restarted.
* Modify the retention time and size for Prometheus and Thanos Ruler metrics data.
* Configure logging to help you troubleshoot issues with your cluster:
ifndef::openshift-dedicated,openshift-rosa[]
** Configure audit logs for Metrics Server.
endif::openshift-dedicated,openshift-rosa[]
** Set log levels for monitoring.
** Enable the query logging for Prometheus and Thanos Querier.

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

ifndef::openshift-dedicated,openshift-rosa[]
* xref:../../../observability/monitoring/configuring-core-platform-monitoring/storing-and-recording-data.adoc#storing-and-recording-data[Storing and recording data for core platform monitoring]
endif::openshift-dedicated,openshift-rosa[]
* xref:../../../observability/monitoring/configuring-user-workload-monitoring/storing-and-recording-data-uwm.adoc#storing-and-recording-data-uwm[Storing and recording data for user workload monitoring]

include::modules/monitoring-retention-time-and-size-for-prometheus-metrics-data.adoc[leveloffset=+2]

// Understanding metrics
include::modules/monitoring-understanding-metrics.adoc[leveloffset=+1]

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

ifndef::openshift-dedicated,openshift-rosa[]
* xref:../../../observability/monitoring/configuring-core-platform-monitoring/configuring-metrics.adoc#configuring-metrics[Configuring metrics for core platform monitoring]
endif::openshift-dedicated,openshift-rosa[]
* xref:../../../observability/monitoring/configuring-user-workload-monitoring/configuring-metrics-uwm.adoc#configuring-metrics-uwm[Configuring metrics for user workload monitoring]
* xref:../../../observability/monitoring/accessing-metrics/accessing-metrics-as-an-administrator.adoc#accessing-metrics-as-an-administrator[Accessing metrics as an administrator]
* xref:../../../observability/monitoring/accessing-metrics/accessing-metrics-as-a-developer.adoc#accessing-metrics-as-a-developer[Accessing metrics as a developer]

include::modules/monitoring-controlling-the-impact-of-unbound-attributes-in-user-defined-projects.adoc[leveloffset=+2]

include::modules/monitoring-adding-cluster-id-labels-to-metrics.adoc[leveloffset=+2]

//About monitoring dashboards

include::modules/monitoring-about-monitoring-dashboards.adoc[leveloffset=+1]

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

* xref:../../../observability/monitoring/accessing-metrics/accessing-metrics-as-an-administrator.adoc#reviewing-monitoring-dashboards-admin_accessing-metrics-as-an-administrator[Reviewing monitoring dashboards as a cluster administrator]
* xref:../../../observability/monitoring/accessing-metrics/accessing-metrics-as-a-developer.adoc#reviewing-monitoring-dashboards-developer_accessing-metrics-as-a-developer[Reviewing monitoring dashboards as a developer]

//Managing alerts
include::modules/monitoring-about-managing-alerts.adoc[leveloffset=+1]

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

ifndef::openshift-dedicated,openshift-rosa[]
* xref:../../../observability/monitoring/configuring-core-platform-monitoring/configuring-alerts-and-notifications.adoc#configuring-alerts-and-notifications[Configuring alerts and notifications for core platform monitoring]
endif::openshift-dedicated,openshift-rosa[]
* xref:../../../observability/monitoring/configuring-user-workload-monitoring/configuring-alerts-and-notifications-uwm.adoc#configuring-alerts-and-notifications-uwm[Configuring alerts and notifications for user workload monitoring]
* xref:../../../observability/monitoring/managing-alerts/managing-alerts-as-an-administrator.adoc#managing-alerts-as-an-administrator[Managing alerts as an Administrator]
* xref:../../../observability/monitoring/managing-alerts/managing-alerts-as-a-developer.adoc#managing-alerts-as-a-developer[Managing alerts as a Developer]

include::modules/monitoring-managing-silences.adoc[leveloffset=+2]

ifndef::openshift-dedicated,openshift-rosa[]
include::modules/monitoring-managing-core-platform-alerting-rules.adoc[leveloffset=+2]

include::modules/monitoring-tips-for-optimizing-alerting-rules-for-core-platform-monitoring.adoc[leveloffset=+2]
endif::openshift-dedicated,openshift-rosa[]

include::modules/monitoring-about-creating-alerting-rules-for-user-defined-projects.adoc[leveloffset=+2]

include::modules/monitoring-managing-alerting-rules-for-user-defined-projects.adoc[leveloffset=+2]

include::modules/monitoring-optimizing-alerting-for-user-defined-projects.adoc[leveloffset=+2]

include::modules/monitoring-searching-alerts-silences-and-alerting-rules.adoc[leveloffset=+2]

// Overview of setting up alert routing for user-defined projects
include::modules/monitoring-understanding-alert-routing-for-user-defined-projects.adoc[leveloffset=+1]

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

* xref:../../../observability/monitoring/configuring-user-workload-monitoring/preparing-to-configure-the-monitoring-stack-uwm.adoc#enabling-alert-routing-for-user-defined-projects_preparing-to-configure-the-monitoring-stack-uwm[Enabling alert routing for user-defined projects]

// Sending notifications to external systems
include::modules/monitoring-sending-notifications-to-external-systems.adoc[leveloffset=+1]

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

ifndef::openshift-dedicated,openshift-rosa[]
* xref:../../../observability/monitoring/configuring-core-platform-monitoring/configuring-alerts-and-notifications.adoc#configuring-alert-notifications_configuring-alerts-and-notifications[Configuring alert notifications for core platform monitoring]
endif::openshift-dedicated,openshift-rosa[]
* xref:../../../observability/monitoring/configuring-user-workload-monitoring/configuring-alerts-and-notifications-uwm.adoc#configuring-alert-notifications_configuring-alerts-and-notifications-uwm[Configuring alert notifications for user workload monitoring]
