Bug 1940882

Summary: Incorrect number of alerts in prometheus and in console
Product: OpenShift Container Platform Reporter: Pawel Krupa <pkrupa>
Component: MonitoringAssignee: Sergiusz Urbaniak <surbania>
Status: CLOSED DUPLICATE QA Contact: Junqi Zhao <juzhao>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.8CC: alegrand, anpicker, erooth, hongyli, kakkoyun, lcosic, pkrupa, spasquie, surbania
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-23 09:22:12 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 Pawel Krupa 2021-03-19 13:23:56 UTC
Description of problem:

The number of alerting rules shown in Console is higher than in prometheus. Some rules are duplicated.
The number of rules in Console is the same as number returned from thanos-querier.

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


How reproducible: Always


Steps to Reproduce:
1. Launch cluster
2. Port-forward to in-cluster prometheus
3. curl -s http://localhost:9090/api/v1/rules | jq '[.data.groups[].rules[] | select(.type=="alerting")] | length'
4. Port-forward to thanos-querier
5. curl -s http://localhost:9090/api/v1/rules | jq '[.data.groups[].rules[] | select(.type=="alerting")] | length'
6. Compare numbers from #3 and #5

Actual results: Numbers don't match


Expected results: Numbers should match


Additional info: 
The primary suspect is incorrect alert deduplication in thanos querier.

Initial slack thread: https://coreos.slack.com/archives/G79AW9Q7R/p1616158687116100

Comment 4 hongyan li 2021-03-23 09:13:10 UTC
Duplicate as bug Bug 1926598

Comment 5 hongyan li 2021-03-23 09:22:12 UTC

*** This bug has been marked as a duplicate of bug 1926598 ***