Parts of OpenShift Container Platform cluster monitoring are configurable. The API is accessible by setting parameters defined in various config maps.
To configure monitoring components, edit the ConfigMap
object named cluster-monitoring-config
in the openshift-monitoring
namespace.
These configurations are defined by ClusterMonitoringConfiguration.
To configure monitoring components that monitor user-defined projects, edit the ConfigMap
object named user-workload-monitoring-config
in the openshift-user-workload-monitoring
namespace.
These configurations are defined by UserWorkloadConfiguration.
The configuration file is always defined under the config.yaml
key in the config map data.
|
The AdditionalAlertmanagerConfig
resource defines settings for how a component communicates with additional Alertmanager instances.
apiVersion
Appears in: PrometheusK8sConfig, PrometheusRestrictedConfig, ThanosRulerConfig
Property | Type | Description |
---|---|---|
apiVersion |
string |
Defines the API version of Alertmanager. Possible values are |
bearerToken |
*v1.SecretKeySelector |
Defines the secret key reference containing the bearer token to use when authenticating to Alertmanager. |
pathPrefix |
string |
Defines the path prefix to add in front of the push endpoint path. |
scheme |
string |
Defines the URL scheme to use when communicating with Alertmanager instances. Possible values are |
staticConfigs |
[]string |
A list of statically configured Alertmanager endpoints in the form of |
timeout |
*string |
Defines the timeout value used when sending alerts. |
tlsConfig |
Defines the TLS settings to use for Alertmanager connections. |
The AlertmanagerMainConfig
resource defines settings for the Alertmanager component in the openshift-monitoring
namespace.
Appears in: ClusterMonitoringConfiguration
Property | Type | Description |
---|---|---|
enabled |
*bool |
A Boolean flag that enables or disables the main Alertmanager instance in the |
enableUserAlertmanagerConfig |
bool |
A Boolean flag that enables or disables user-defined namespaces to be selected for |
logLevel |
string |
Defines the log level setting for Alertmanager. The possible values are: |
nodeSelector |
map[string]string |
Defines the nodes on which the Pods are scheduled. |
resources |
*v1.ResourceRequirements |
Defines resource requests and limits for the Alertmanager container. |
tolerations |
[]v1.Toleration |
Defines tolerations for the pods. |
volumeClaimTemplate |
*monv1.EmbeddedPersistentVolumeClaim |
Defines persistent storage for Alertmanager. Use this setting to configure the persistent volume claim, including storage class, volume size, and name. |
The AlertmanagerUserWorkloadConfig
resource defines the settings for the Alertmanager instance used for user-defined projects.
Appears in: UserWorkloadConfiguration
Property | Type | Description |
---|---|---|
enabled |
bool |
A Boolean flag that enables or disables a dedicated instance of Alertmanager for user-defined alerts in the |
enableAlertmanagerConfig |
bool |
A Boolean flag to enable or disable user-defined namespaces to be selected for |
logLevel |
string |
Defines the log level setting for Alertmanager for user workload monitoring. The possible values are |
resources |
*v1.ResourceRequirements |
Defines resource requests and limits for the Alertmanager container. |
nodeSelector |
map[string]string |
Defines the nodes on which the pods are scheduled. |
tolerations |
[]v1.Toleration |
Defines tolerations for the pods. |
volumeClaimTemplate |
*monv1.EmbeddedPersistentVolumeClaim |
Defines persistent storage for Alertmanager. Use this setting to configure the persistent volume claim, including storage class, volume size and name. |
The ClusterMonitoringConfiguration
resource defines settings that customize the default platform monitoring stack through the cluster-monitoring-config
config map in the openshift-monitoring
namespace.
Property | Type | Description |
---|---|---|
alertmanagerMain |
|
|
enableUserWorkload |
*bool |
|
k8sPrometheusAdapter |
|
|
kubeStateMetrics |
|
|
prometheusK8s |
|
|
prometheusOperator |
|
|
openshiftStateMetrics |
|
|
telemeterClient |
|
|
thanosQuerier |
|
You can use the DedicatedServiceMonitors
resource to configure dedicated Service Monitors for the Prometheus Adapter
Appears in: K8sPrometheusAdapter
Property | Type | Description |
---|---|---|
enabled |
bool |
When |
The K8sPrometheusAdapter
resource defines settings for the Prometheus Adapter component.
Appears in: ClusterMonitoringConfiguration
Property | Type | Description |
---|---|---|
audit |
*Audit |
Defines the audit configuration used by the Prometheus Adapter instance. Possible profile values are: |
nodeSelector |
map[string]string |
Defines the nodes on which the pods are scheduled. |
tolerations |
[]v1.Toleration |
Defines tolerations for the pods. |
dedicatedServiceMonitors |
Defines dedicated service monitors. |
The KubeStateMetricsConfig
resource defines settings for the kube-state-metrics
agent.
Appears in: ClusterMonitoringConfiguration
Property | Type | Description |
---|---|---|
nodeSelector |
map[string]string |
Defines the nodes on which the pods are scheduled. |
tolerations |
[]v1.Toleration |
Defines tolerations for the pods. |
The OpenShiftStateMetricsConfig
resource defines settings for the openshift-state-metrics
agent.
Appears in: ClusterMonitoringConfiguration
Property | Type | Description |
---|---|---|
nodeSelector |
map[string]string |
Defines the nodes on which the pods are scheduled. |
tolerations |
[]v1.Toleration |
Defines tolerations for the pods. |
The PrometheusK8sConfig
resource defines settings for the Prometheus component.
Appears in: ClusterMonitoringConfiguration
Property | Type | Description |
---|---|---|
additionalAlertmanagerConfigs |