Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2064984

Summary: Update error message for label limits
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: MonitoringAssignee: Jayapriya Pai <janantha>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: low    
Version: 4.11CC: amuller, anpicker, aos-bugs, spasquie
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 10:54:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Junqi Zhao 2022-03-17 03:13:56 UTC
Description of problem:
the bug is separated from https://bugzilla.redhat.com/show_bug.cgi?id=2056802#c7
since it is a low severity bug, we can track with this bug and let the PR cluster-monitoring-operator#1350 merge first

Version-Release number of selected component (if applicable):
tested with PR

How reproducible:
always

Steps to Reproduce:
1. see from https://bugzilla.redhat.com/show_bug.cgi?id=2056802#c7
2.
3.

Actual results:
the error msg is not readable

Expected results:


Additional info:

Comment 1 Jayapriya Pai 2022-03-17 09:13:15 UTC
PR already created in upstream https://github.com/prometheus/prometheus/pull/10423

Comment 4 Jayapriya Pai 2022-06-03 06:26:49 UTC
Once https://github.com/openshift/prometheus/pull/131 is merged error limit message should be updated

Comment 6 Junqi Zhao 2022-06-14 04:33:10 UTC
tested with 4.11.0-0.nightly-2022-06-13-215813 and followed steps in https://bugzilla.redhat.com/show_bug.cgi?id=2056802#c7, the error message is better now
1. # oc -n openshift-user-workload-monitoring get prometheus user-workload -oyaml |  grep -E "enforcedLabelLimit|enforcedLabelNameLengthLimit|enforcedLabelValueLengthLimit"
  enforcedLabelLimit: 8
  enforcedLabelNameLengthLimit: 1
  enforcedLabelValueLengthLimit: 1

error in /targets API
        "scrapePool": "serviceMonitor/ns1/prometheus-example-monitor/0",
        "scrapeUrl": "http://10.129.2.15:8080/metrics",
        "globalUrl": "http://10.129.2.15:8080/metrics",
        "lastError": "label_name_length_limit exceeded (metric: version, label name: __name__, length: 8, limit: 1)",
        "lastScrape": "2022-06-14T04:05:33.23712913Z",
        "lastScrapeDuration": 0.001671841,
        "health": "down"
      },
2. # oc -n openshift-user-workload-monitoring get prometheus user-workload -oyaml |  grep -E "enforcedLabelLimit|enforcedLabelNameLengthLimit|enforcedLabelValueLengthLimit"
  enforcedLabelLimit: 8
  enforcedLabelNameLengthLimit: 8
  enforcedLabelValueLengthLimit: 22

        "scrapePool": "serviceMonitor/ns1/prometheus-example-monitor/0",
        "scrapeUrl": "http://10.129.2.15:8080/metrics",
        "globalUrl": "http://10.129.2.15:8080/metrics",
        "lastError": "label_name_length_limit exceeded (metric: version, label name: namespace, length: 9, limit: 8)",
        "lastScrape": "2022-06-14T04:20:23.997111943Z",
        "lastScrapeDuration": 0.000949157,
        "health": "down"

# oc -n openshift-monitoring logs -c prometheus prometheus-k8s-0 | head
ts=2022-06-14T02:17:04.130Z caller=main.go:552 level=info msg="Starting Prometheus Server" mode=server version="(version=2.36.1, branch=rhaos-4.11-rhel-8, revision=2e811f8846f31ea97560139e10eed9d88a7c00d3)"

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