Bug 2046597 - Observe > Targets page may show the wrong service monitor is multiple monitors have the same namespace & label selectors
Summary: Observe > Targets page may show the wrong service monitor is multiple monitor...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.10
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.10.0
Assignee: Andrew Pickering
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-27 03:38 UTC by Andrew Pickering
Modified: 2022-03-12 04:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-12 04:41:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10942 0 None open Bug 2046597: Monitoring targets: Fix handling of duplicate service monitors 2022-01-27 03:39:26 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-12 04:42:08 UTC

Comment 3 Junqi Zhao 2022-01-28 08:49:09 UTC
tested with the PR, the 2 service monitors have exactly the same namespace selector and label selector, Observe > Targets page now show the correct service monitor, see the picture.
# oc -n ns1 get servicemonitor
NAME                           AGE
prometheus-example-monitor-1   11m
prometheus-example-monitor-2   10m


# oc -n ns1 get servicemonitor prometheus-example-monitor-1 -o jsonpath="{.spec.namespaceSelector}"; echo -e "\n"; oc -n ns1 get servicemonitor prometheus-example-monitor-1 -o jsonpath="{.spec.selector.matchLabels}"
{"matchNames":["ns1"]}

{"app":"prometheus-example-app"}

# oc -n ns1 get servicemonitor prometheus-example-monitor-2 -o jsonpath="{.spec.namespaceSelector}"; echo -e "\n"; oc -n ns1 get servicemonitor prompath="{.spec.selector.matchLabels}"
{"matchNames":["ns1"]}

{"app":"prometheus-example-app"}

Comment 9 errata-xmlrpc 2022-03-12 04:41:56 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 (Moderate: OpenShift Container Platform 4.10.3 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:0056


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