Questo contenuto non è disponibile nella lingua selezionata.

Chapter 14. ConfigMap reference for Cluster Monitoring Operator


14.1. Cluster Monitoring configuration reference

Parts of Cluster Monitoring are configurable. The API is accessible through parameters defined in various ConfigMaps.

Depending on which part of the stack you want to configure, edit the following:

  • The configuration of OpenShift Container Platform monitoring components in a ConfigMap called cluster-monitoring-config in the openshift-monitoring namespace. Defined by ClusterMonitoringConfiguration.
  • The configuration of components that monitor user-defined projects in a ConfigMap called user-workload-monitoring-config in the openshift-user-workload-monitoring namespace. Defined by UserWorkloadConfiguration.

The configuration file itself is always defined under the config.yaml key within the ConfigMap data.

Note

Not all configuration parameters are exposed. Configuring Cluster Monitoring is optional. If the configuration does not exist or is empty or malformed, defaults are used.

14.2. AdditionalAlertmanagerConfig

14.2.1. Description

AdditionalAlertmanagerConfig defines configuration on how a component should communicate with aditional Alertmanager instances.

14.2.2. Required

  • apiVersion

Appears in: PrometheusK8sConfig, PrometheusRestrictedConfig, ThanosRulerConfig

PropertyTypeDescription

apiVersion

string

APIVersion defines the api version of Alertmanager.

bearerToken

v1.SecretKeySelector

BearerToken defines the bearer token to use when authenticating to Alertmanager.

pathPrefix

string

PathPrefix defines the path prefix to add in front of the push endpoint path.

scheme

string

Scheme the URL scheme to use when talking to Alertmanagers.

staticConfigs

array(string)

StaticConfigs a list of statically configured Alertmanagers.

timeout

string

Timeout defines the timeout used when sending alerts.

tlsConfig

TLSConfig

TLSConfig defines the TLS Config to use for alertmanager connection.

14.3. AlertmanagerMainConfig

14.3.1. Description

AlertmanagerMainConfig defines configuration related with the main Alertmanager instance.

Appears in: ClusterMonitoringConfiguration

PropertyTypeDescription

enabled

bool

Enabled a boolean flag to enable or disable the main Alertmanager instance under openshift-monitoring default: true

enableUserAlertmanagerConfig

bool

EnableUserAlertManagerConfig boolean flag to enable or disable user-defined namespaces to be selected for AlertmanagerConfig lookup, by default Alertmanager only looks for configuration in the namespace where it was deployed to. This will only work if the UWM Alertmanager instance is not enabled. default: false

logLevel

string

LogLevel defines the log level for Alertmanager. Possible values are: error, warn, info, debug. default: info

nodeSelector

map[string]string

NodeSelector defines which Nodes the Pods are scheduled on.

resources

v1.ResourceRequirements

Resources define resources requests and limits for single Pods.

tolerations

array(v1.Toleration)

Tolerations defines the Pods tolerations.

volumeClaimTemplate

monv1.EmbeddedPersistentVolumeClaim

VolumeClaimTemplate defines persistent storage for Alertmanager. It’s possible to configure storageClass and size of volume.

14.4. ClusterMonitoringConfiguration

14.4.1. Description

ClusterMonitoringConfiguration defines configuration that allows users to customise the platform monitoring stack through the cluster-monitoring-config ConfigMap in the openshift-monitoring namespace

PropertyTypeDescription

alertmanagerMain

AlertmanagerMainConfig

AlertmanagerMainConfig defines configuration related with the main Alertmanager instance.

enableUserWorkload

bool

UserWorkloadEnabled boolean flag to enable monitoring for user-defined projects.

k8sPrometheusAdapter

K8sPrometheusAdapter

K8sPrometheusAdapter defines configuration related with prometheus-adapter

kubeStateMetrics

KubeStateMetricsConfig

KubeStateMetricsConfig defines configuration related with kube-state-metrics agent

prometheusK8s

PrometheusK8sConfig

PrometheusK8sConfig defines configuration related with prometheus

prometheusOperator

PrometheusOperatorConfig

PrometheusOperatorConfig defines configuration related with prometheus-operator

openshiftStateMetrics

OpenShiftStateMetricsConfig

OpenShiftMetricsConfig defines configuration related with openshift-state-metrics agent

thanosQuerier

ThanosQuerierConfig

ThanosQuerierConfig defines configuration related with the Thanos Querier component

14.5. K8sPrometheusAdapter

14.5.1. Description

K8sPrometheusAdapter defines configuration related with Prometheus Adapater

Appears in: ClusterMonitoringConfiguration

PropertyTypeDescription

audit

Audit

Audit defines the audit configuration to be used by the prometheus adapter instance. Possible profile values are: "metadata, request, requestresponse, none". default: metadata

nodeSelector

map[string]string

NodeSelector defines which Nodes the Pods are scheduled on.

tolerations

array(v1.Toleration)

Tolerations defines the Pods tolerations.

14.6. KubeStateMetricsConfig

14.6.1. Description

KubeStateMetricsConfig defines configuration related with the kube-state-metrics agent.

Appears in: ClusterMonitoringConfiguration

PropertyTypeDescription

nodeSelector

map[string]string

NodeSelector defines which Nodes the Pods are scheduled on.

tolerations

array(v1.Toleration)

Tolerations defines the Pods tolerations.

14.7. OpenShiftStateMetricsConfig

14.7.1. Description

OpenShiftStateMetricsConfig holds configuration related to openshift-state-metrics agent.

Appears in: ClusterMonitoringConfiguration

PropertyTypeDescription

nodeSelector

map[string]string

NodeSelector defines which Nodes the Pods are scheduled on.

tolerations

array(v1.Toleration)

Tolerations defines the Pods tolerations.

14.8. PrometheusK8sConfig

14.8.1. Description

PrometheusK8sConfig holds configuration related to the Prometheus component.

Appears in: ClusterMonitoringConfiguration

PropertyTypeDescription

additionalAlertmanagerConfigs

array(AdditionalAlertmanagerConfig)

AlertmanagerConfigs holds configuration about how the Prometheus component should communicate with aditional Alertmanager instances. default: nil

externalLabels

map[string]string

ExternalLabels defines labels to be added to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). default: nil

logLevel

string

LogLevel defines the log level for Prometheus. Possible values are: error, warn, info, debug. default: info

nodeSelector

map[string]string

NodeSelector defines which Nodes the Pods are scheduled on.

queryLogFile

string

QueryLogFile specifies the file to which PromQL queries are logged. Suports both just a filename in which case they will be saved to an emptyDir volume at /var/log/prometheus, if a full path is given an emptyDir volume will be mounted at that location. Relative paths not supported, also not supported writing to linux std streams. default: ""

remoteWrite

array(remotewritespec)

RemoteWrite Holds the remote write configuration, everything from url, authorization to relabeling

resources

v1.ResourceRequirements

Resources define resources requests and limits for single Pods.

retention

string

Retention defines the Time duration Prometheus shall retain data for. Must match the regular expression [0-9]+(ms|s|m|h|d|w|y) (milliseconds seconds minutes hours days weeks years). default: 15d

tolerations

array(v1.Toleration)

Tolerations defines the Pods tolerations.

volumeClaimTemplate

monv1.EmbeddedPersistentVolumeClaim

VolumeClaimTemplate defines persistent storage for Prometheus. It’s possible to configure storageClass and size of volume.

14.9. PrometheusOperatorConfig

14.9.1. Description

PrometheusOperatorConfig holds configuration related to Prometheus Operator.

Appears in: ClusterMonitoringConfiguration, UserWorkloadConfiguration

PropertyTypeDescription

logLevel

string

LogLevel defines the log level for Prometheus Operator. Possible values are: error, warn, info, debug. default: info

nodeSelector

map[string]string

NodeSelector defines which Nodes the Pods are scheduled on.

tolerations

array(v1.Toleration)

Tolerations defines the Pods tolerations.

14.10. PrometheusRestrictedConfig

14.10.1. Description

PrometheusRestrictedConfig defines configuration related to the Prometheus component that will monitor user-defined projects.

Appears in: UserWorkloadConfiguration

PropertyTypeDescription

additionalAlertmanagerConfigs

array(additionalalertmanagerconfig)

AlertmanagerConfigs holds configuration about how the Prometheus component should communicate with aditional Alertmanager instances. default: nil

enforcedSampleLimit

uint64

EnforcedSampleLimit defines a global limit on the number of scraped samples that will be accepted. This overrides any SampleLimit set per ServiceMonitor or/and PodMonitor. It is meant to be used by admins to enforce the SampleLimit to keep the overall number of samples/series under the desired limit. Note that if SampleLimit is lower that value will be taken instead. default: 0

enforcedTargetLimit

uint64

EnforcedTargetLimit defines a global limit on the number of scraped targets. This overrides any TargetLimit set per ServiceMonitor or/and PodMonitor. It is meant to be used by admins to enforce the TargetLimit to keep the overall number of targets under the desired limit. Note that if TargetLimit is lower, that value will be taken instead, except if either value is zero, in which case the non-zero value will be used. If both values are zero, no limit is enforced. default: 0

externalLabels

map[string]string

ExternalLabels defines labels to be added to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). default: nil

logLevel

string

LogLevel defines the log level for Prometheus. Possible values are: error, warn, info, debug. default: info

nodeSelector

map[string]string

NodeSelector defines which Nodes the Pods are scheduled on.

queryLogFile

string

QueryLogFile specifies the file to which PromQL queries are logged. Suports both just a filename in which case they will be saved to an emptyDir volume at /var/log/prometheus, if a full path is given an emptyDir volume will be mounted at that location. Relative paths not supported, also not supported writing to linux std streams. default: ""

remoteWrite

array(remotewritespec)

RemoteWrite Holds the remote write configuration, everything from url, authorization to relabeling

resources

v1.ResourceRequirements

Resources define resources requests and limits for single Pods.

retention

string

Retention defines the Time duration Prometheus shall retain data for. Must match the regular expression [0-9]+(ms|s|m|h|d|w|y) (milliseconds seconds minutes hours days weeks years). default: 15d

tolerations

array(v1.Toleration)

Tolerations defines the Pods tolerations.

volumeClaimTemplate

monv1.EmbeddedPersistentVolumeClaim

VolumeClaimTemplate defines persistent storage for Prometheus. It’s possible to configure storageClass and size of volume.

14.11. RemoteWriteSpec

14.11.1. Description

RemoteWriteSpec is an almost identical copy of monv1.RemoteWriteSpec but with the BearerToken field removed. In the future other fields might be added here.

14.11.2. Required

  • url

Appears in: PrometheusK8sConfig, PrometheusRestrictedConfig

PropertyTypeDescription

authorization

monv1.SafeAuthorization

Authorization defines the authorization section for remote write

basicAuth

monv1.BasicAuth

BasicAuth defines configuration for basic authentication for the URL.

bearerTokenFile

string

BearerTokenFile defines the file where the bearer token for remote write resides.

headers

map[string]string

Headers custom HTTP headers to be sent along with each remote write request. Be aware that headers that are set by Prometheus itself can’t be overwritten.

metadataConfig

monv1.MetadataConfig

MetadataConfig configures the sending of series metadata to remote storage.

name

string

Name defines the name of the remote write queue, must be unique if specified. The name is used in metrics and logging in order to differentiate queues.

oauth2

monv1.OAuth2

OAuth2 configures OAuth2 authentication for remote write.

proxyUrl

string

ProxyURL defines an optional proxy URL

queueConfig

monv1.QueueConfig

QueueConfig allows tuning of the remote write queue parameters.

remoteTimeout

string

RemoteTimeout defines the timeout for requests to the remote write endpoint.

sigv4

monv1.Sigv4

Sigv4 allows to configures AWS’s Signature Verification 4

tlsConfig

monv1.SafeTLSConfig

TLSConfig defines the TLS configuration to use for remote write.

url

string

URL defines the URL of the endpoint to send samples to.

writeRelabelConfigs

array(monv1.RelabelConfig)

WriteRelabelConfigs defines the list of remote write relabel configurations.

14.12. TLSConfig

14.12.1. Description

TLSConfig configures the options for TLS connections.

14.12.2. Required

  • insecureSkipVerify

Appears in: AdditionalAlertmanagerConfig

PropertyTypeDescription

ca

v1.SecretKeySelector

CA defines the CA cert in the Prometheus container to use for the targets.

cert

v1.SecretKeySelector

Cert defines the client cert in the Prometheus container to use for the targets.

key

v1.SecretKeySelector

Key defines the client key in the Prometheus container to use for the targets.

serverName

string

ServerName used to verify the hostname for the targets.

insecureSkipVerify

bool

InsecureSkipVerify disable target certificate validation.

14.13. ThanosQuerierConfig

14.13.1. Description

ThanosQuerierConfig holds configuration related to Thanos Querier component.

Appears in: ClusterMonitoringConfiguration

PropertyTypeDescription

enableRequestLogging

bool

EnableRequestLogging boolean flag to enable or disable request logging default: false

logLevel

string

LogLevel defines the log level for Thanos Querier. Possible values are: error, warn, info, debug. default: info

nodeSelector

map[string]string

NodeSelector defines which Nodes the Pods are scheduled on.

resources

v1.ResourceRequirements

Resources define resources requests and limits for single Pods.

tolerations

array(v1.Toleration)

Tolerations defines the Pods tolerations.

14.14. ThanosRulerConfig

14.14.1. Description

ThanosRulerConfig defines configuration for the Thanos Ruler instance for user-defined projects.

Appears in: UserWorkloadConfiguration

PropertyTypeDescription

additionalAlertmanagerConfigs

array(additionalalertmanagerconfig)

AlertmanagerConfigs holds configuration about how the Thanos Ruler component should communicate with aditional Alertmanager instances. default: nil

logLevel

string

LogLevel defines the log level for Thanos Ruler. Possible values are: error, warn, info, debug. default: info

nodeSelector

map[string]string

NodeSelector defines which Nodes the Pods are scheduled on.

resources

v1.ResourceRequirements

Resources define resources requests and limits for single Pods.

retention

string

Retention defines the time duration Thanos Ruler shall retain data for. Must match the regular expression [0-9]+(ms|s|m|h|d|w|y) (milliseconds seconds minutes hours days weeks years). default: 15d

tolerations

array(v1.Toleration)

Tolerations defines the Pods tolerations.

volumeClaimTemplate

monv1.EmbeddedPersistentVolumeClaim

VolumeClaimTemplate defines persistent storage for Thanos Ruler. It’s possible to configure storageClass and size of volume.

14.15. UserWorkloadConfiguration

14.15.1. Description

UserWorkloadConfiguration defines configuration that allows users to customise the monitoring stack responsible for user-defined projects through the user-workload-monitoring-config ConfigMap in the openshift-user-workload-monitoring namespace

PropertyTypeDescription

prometheus

PrometheusRestrictedConfig

Prometheus defines configuration for Prometheus component.

prometheusOperator

PrometheusOperatorConfig

PrometheusOperator defines configuration for prometheus-operator component.

thanosRuler

ThanosRulerConfig

ThanosRuler defines configuration for the Thanos Ruler component

Red Hat logoGithubRedditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita ilBlog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

© 2024 Red Hat, Inc.