Document URL: https://docs.openshift.com/container-platform/4.9/monitoring/configuring-the-monitoring-stack.html#configuring_remote_write_storage_configuring-the-monitoring-stack Section Number and Name: Point 4 under "Configuring remote write storage" Describe the issue: The sample configuration in the above-mentioned section for adding write relabel configuration values in cluster-monitoring-config is as below: remoteWrite: - url: "https://remote-write.endpoint" writeRelabelConfigs: - source_labels: [__name__] regex: 'my_metric' action: keep Here "source_labels" is wrong (It should be "sourceLabels"). Configuring remote write in this way would result in regex not being able to match as the prometheus config resulting from this cm would be: $ oc exec -n openshift-monitoring pod/prometheus-k8s-1 cat /etc/prometheus/config_out/prometheus.env.yaml remote_write: - url: https://remote-write.endpoint remote_timeout: 30s write_relabel_configs: - regex: my_metric <----- no source label to match action: keep when it should be: remote_write: - url: https://remote-write.endpoint remote_timeout: 30s write_relabel_configs: - source_labels: - __name__ regex: my_metric action: keep Suggestions for improvement: Change "source_labels" to "sourceLabels" in the document. Version-Release number of selected component (if applicable): 4.9 How reproducible: 100% Steps to Reproduce: 1. Configure remoteWrite as in doc with writeRelabelConfigs Actual results: Regex does not match. $ oc exec -n openshift-monitoring pod/prometheus-k8s-1 cat /etc/prometheus/config_out/prometheus.env.yaml remote_write: - url: https://remote-write.endpoint remote_timeout: 30s write_relabel_configs: - regex: my_metric <----- no source label to match action: keep Expected results: Regex should match. $ oc exec -n openshift-monitoring pod/prometheus-k8s-1 cat /etc/prometheus/config_out/prometheus.env.yaml remote_write: - url: https://remote-write.endpoint remote_timeout: 30s write_relabel_configs: - source_labels: - __name__ regex: my_metric
Removing blocker as doc error has been release already.
PR and backports are merged, the 4.9 version already reflects this fix, closing. https://docs.openshift.com/container-platform/4.9/monitoring/configuring-the-monitoring-stack.html#configuring_remote_write_storage_configuring-the-monitoring-stack
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069