diff --git a/Documentation/api.md b/Documentation/api.md index 4f8a1d2ab1..f16f8240e3 100644 --- a/Documentation/api.md +++ b/Documentation/api.md @@ -424,7 +424,7 @@ The `PrometheusK8sConfig` resource defines settings for the Prometheus component | -------- | ---- | ----------- | | additionalAlertmanagerConfigs | [][AdditionalAlertmanagerConfig](#additionalalertmanagerconfig) | Configures additional Alertmanager instances that receive alerts from the Prometheus component. By default, no additional Alertmanager instances are configured. | | enforcedBodySizeLimit | string | Enforces a body size limit for Prometheus scraped metrics. If a scraped target's body response is larger than the limit, the scrape will fail. The following values are valid: an empty value to specify no limit, a numeric value in Prometheus size format (such as `64MB`), or the string `automatic`, which indicates that the limit will be automatically calculated based on cluster capacity. The default value is empty, which indicates no limit. | -| externalLabels | ExternalLabels | Defines labels to be added to any time series or alerts when communicating with external systems such as federation, remote storage, and Alertmanager. By default, no labels are added. | +| externalLabels | ExternalLabels | Defines labels to be added to any time series or alerts when communicating with external systems such as federation, remote storage, and Alertmanager. A map[string]string. By default, no labels are added. | | logLevel | string | Defines the log level setting for Prometheus. The possible values are: `error`, `warn`, `info`, and `debug`. The default value is `info`. | | nodeSelector | map[string]string | Defines the nodes on which the pods are scheduled. | | queryLogFile | string | Specifies the file to which PromQL queries are logged. This setting can be either a filename, in which case the queries are saved to an `emptyDir` volume at `/var/log/prometheus`, or a full path to a location where an `emptyDir` volume will be mounted and the queries saved. Writing to `/dev/stderr`, `/dev/stdout` or `/dev/null` is supported, but writing to any other `/dev/` path is not supported. Relative paths are also not supported. By default, PromQL queries are not logged. | @@ -493,7 +493,7 @@ The `PrometheusRestrictedConfig` resource defines the settings for the Prometheu | enforcedLabelValueLengthLimit | *uint64 | Specifies a per-scrape limit on the length of a label value for a sample. If the length of a label value exceeds this limit after metric relabeling, the entire scrape is treated as failed. The default value is `0`, which means that no limit is set. | | enforcedSampleLimit | *uint64 | Specifies a global limit on the number of scraped samples that will be accepted. This setting overrides the `SampleLimit` value set in any user-defined `ServiceMonitor` or `PodMonitor` object if the value is greater than `enforcedTargetLimit`. Administrators can use this setting to keep the overall number of samples under control. The default value is `0`, which means that no limit is set. | | enforcedTargetLimit | *uint64 | Specifies a global limit on the number of scraped targets. This setting overrides the `TargetLimit` value set in any user-defined `ServiceMonitor` or `PodMonitor` object if the value is greater than `enforcedSampleLimit`. Administrators can use this setting to keep the overall number of targets under control. The default value is `0`. | -| externalLabels | ExternalLabels | Defines labels to be added to any time series or alerts when communicating with external systems such as federation, remote storage, and Alertmanager. By default, no labels are added. | +| externalLabels | ExternalLabels | Defines labels to be added to any time series or alerts when communicating with external systems such as federation, remote storage, and Alertmanager. A map[string]string. By default, no labels are added. | | logLevel | string | Defines the log level setting for Prometheus. The possible values are `error`, `warn`, `info`, and `debug`. The default setting is `info`. | | nodeSelector | map[string]string | Defines the nodes on which the pods are scheduled. | | queryLogFile | string | Specifies the file to which PromQL queries are logged. This setting can be either a filename, in which case the queries are saved to an `emptyDir` volume at `/var/log/prometheus`, or a full path to a location where an `emptyDir` volume will be mounted and the queries saved. Writing to `/dev/stderr`, `/dev/stdout` or `/dev/null` is supported, but writing to any other `/dev/` path is not supported. Relative paths are also not supported. By default, PromQL queries are not logged. | diff --git a/Documentation/openshiftdocs/modules/prometheusk8sconfig.adoc b/Documentation/openshiftdocs/modules/prometheusk8sconfig.adoc index 660117c6e5..7149d0ab0a 100644 --- a/Documentation/openshiftdocs/modules/prometheusk8sconfig.adoc +++ b/Documentation/openshiftdocs/modules/prometheusk8sconfig.adoc @@ -22,7 +22,7 @@ Appears in: link:clustermonitoringconfiguration.adoc[ClusterMonitoringConfigurat |enforcedBodySizeLimit|string|Enforces a body size limit for Prometheus scraped metrics. If a scraped target's body response is larger than the limit, the scrape will fail. The following values are valid: an empty value to specify no limit, a numeric value in Prometheus size format (such as `64MB`), or the string `automatic`, which indicates that the limit will be automatically calculated based on cluster capacity. The default value is empty, which indicates no limit. -|externalLabels|ExternalLabels|Defines labels to be added to any time series or alerts when communicating with external systems such as federation, remote storage, and Alertmanager. By default, no labels are added. +|externalLabels|ExternalLabels|Defines labels to be added to any time series or alerts when communicating with external systems such as federation, remote storage, and Alertmanager. A map[string]string. By default, no labels are added. |logLevel|string|Defines the log level setting for Prometheus. The possible values are: `error`, `warn`, `info`, and `debug`. The default value is `info`. diff --git a/Documentation/openshiftdocs/modules/prometheusrestrictedconfig.adoc b/Documentation/openshiftdocs/modules/prometheusrestrictedconfig.adoc index 96dd362ba9..f6564ad1d4 100644 --- a/Documentation/openshiftdocs/modules/prometheusrestrictedconfig.adoc +++ b/Documentation/openshiftdocs/modules/prometheusrestrictedconfig.adoc @@ -34,7 +34,7 @@ Appears in: link:userworkloadconfiguration.adoc[UserWorkloadConfiguration] |enforcedTargetLimit|*uint64|Specifies a global limit on the number of scraped targets. This setting overrides the `TargetLimit` value set in any user-defined `ServiceMonitor` or `PodMonitor` object if the value is greater than `enforcedSampleLimit`. Administrators can use this setting to keep the overall number of targets under control. The default value is `0`. -|externalLabels|ExternalLabels|Defines labels to be added to any time series or alerts when communicating with external systems such as federation, remote storage, and Alertmanager. By default, no labels are added. +|externalLabels|ExternalLabels|Defines labels to be added to any time series or alerts when communicating with external systems such as federation, remote storage, and Alertmanager. A map[string]string. By default, no labels are added. |logLevel|string|Defines the log level setting for Prometheus. The possible values are `error`, `warn`, `info`, and `debug`. The default setting is `info`. diff --git a/pkg/manifests/types.go b/pkg/manifests/types.go index 287d1bc61e..81b3dd912d 100644 --- a/pkg/manifests/types.go +++ b/pkg/manifests/types.go @@ -195,7 +195,8 @@ type PrometheusK8sConfig struct { EnforcedBodySizeLimit string `json:"enforcedBodySizeLimit,omitempty"` // Defines labels to be added to any time series or alerts when // communicating with external systems such as federation, remote storage, - // and Alertmanager. By default, no labels are added. + // and Alertmanager. + // A map[string]string. By default, no labels are added. ExternalLabels ExternalLabels `json:"externalLabels,omitempty"` // Defines the log level setting for Prometheus. // The possible values are: `error`, `warn`, `info`, and `debug`. @@ -659,7 +660,7 @@ type PrometheusRestrictedConfig struct { // Defines labels to be added to any time series or alerts when // communicating with external systems such as federation, remote storage, // and Alertmanager. - // By default, no labels are added. + // A map[string]string. By default, no labels are added. ExternalLabels ExternalLabels `json:"externalLabels,omitempty"` // Defines the log level setting for Prometheus. // The possible values are `error`, `warn`, `info`, and `debug`.