Bug 2065682 - Remote write relabel config adds label __tmp_openshift_cluster_id__ to all metrics
Summary: Remote write relabel config adds label __tmp_openshift_cluster_id__ to all me...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.11
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.11.0
Assignee: Jan Fajerski
QA Contact: hongyan li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-18 13:24 UTC by Jan Fajerski
Modified: 2022-08-29 21:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 10:54:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-monitoring-operator pull 1597 0 None open Bug 2065682: manifest: explicitly drop the temporary cluster id label 2022-03-18 13:43:51 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:55:14 UTC

Description Jan Fajerski 2022-03-18 13:24:55 UTC
Description of problem:
For the implementation https://issues.redhat.com/browse/MON-2245 we add a label called  __tmp_openshift_cluster_id__ with the value of the clusters id to all remote_write configurations. This is intended to be used as an input for users to add the cluster_id as a label of teir choice.
For write_relabel_configs (as opposed to relabel_configs) labels with a name starting with __ are not automatically dropped, so we end up with the __tmp_openshift_cluster_id__  on all metrics send via remote_write.

Version-Release number of selected component (if applicable):
4.11

How reproducible:
Add a remote_write specification to cluster-monitoring-config.

Actual results:
All metrics that are send vial remote_write have the __tmp_openshift_cluster_id__ label.

Expected results:
No additional label.

Comment 3 hongyan li 2022-03-21 04:59:24 UTC
Test with payload 4.11.0-0.nightly-2022-03-20-160505

oc apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
  name: cluster-monitoring-config
  namespace: openshift-monitoring
data:
  config.yaml: |
    prometheusK8s:
      remoteWrite:
      - url: "https://remote-write.endpoint"
        writeRelabelConfigs:
        - sourceLabels:
          - __tmp_openshift_cluster_id__
          targetLabel: "cluster_id"
EOF

$ oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- cat /etc/prometheus/config_out/prometheus.env.yaml|grep -i -A15 remote_write 
remote_write:
- url: https://remote-write.endpoint
  remote_timeout: 30s
  write_relabel_configs:
  - target_label: __tmp_openshift_cluster_id__
    replacement: 996af312-a993-4066-9c66-975faeba18bc
    action: replace
  - source_labels:
    - __tmp_openshift_cluster_id__
    target_label: cluster_id
    action: replace
  - regex: __tmp_openshift_cluster_id__
    action: labeldrop

Comment 7 errata-xmlrpc 2022-08-10 10:54:40 UTC
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

Comment 8 amandalawrance 2022-08-29 21:38:56 UTC
This post is informative, however I noticed that the one on https://www.tmcnet.com/topics/articles/2022/02/24/451626-best-essay-writing-services-2021-everything-should-know.htm had much more helpful details, so you might want to check that out as well. College students who are looking for advice on selecting a writing service will find it useful. A former version of myself was a student just like me a few years ago.


Note You need to log in before you can comment on or make changes to this bug.