Bug 1973576

Summary: only show annotations.summary field on thanos-ruler Alerts page
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: MonitoringAssignee: Arunprasad Rajkumar <arajkuma>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: low    
Version: 4.8CC: anpicker, aos-bugs, erooth, janantha
Target Milestone: ---Keywords: Regression, Reopened
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-18 17:35:39 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:
Attachments:
Description Flags
thanos-ruler Alerts page
none
thanos-ruler Rules page
none
upstream - thanos 0.22.0 none

Description Junqi Zhao 2021-06-18 08:06:05 UTC
Created attachment 1792000 [details]
thanos-ruler Alerts page

Description of problem:
eanbled UWM and create prometheus rules under user namespace, one rule has annotations.description and annotations.summary fields, one rule only has annotations.message field
****************************
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: story-rules
spec:
  groups:
  - name: alerting rules
    rules:
    - alert: vector(1)
      expr: vector(1)
      labels:
        severity: none
      annotations:
        description: vector(1).
        summary: vector(1)
    - alert: vector(10)
      expr: vector(10)
      labels:
        severity: warning
      annotations:
        message: vector(10)
****************************
see from the attached picture, on thanos-ruler UI, Alerts tab, if the rules have annotations.summary field, it will show this filed, otherwise, the other fields are ignored, like the followings
****************************
name: vector(1)
expr: vector(1)
labels:
  severity: none
annotations:
  summary: vector(1)


name: vector(10)
expr: vector(10)
labels:
  severity: warning
annotations:
  summary: 
****************************
Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-06-17-002034
thanos, version 0.20.2

How reproducible:
always

Steps to Reproduce:
1. 
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Junqi Zhao 2021-06-18 08:06:47 UTC
Created attachment 1792001 [details]
thanos-ruler Rules page

Comment 4 Arunprasad Rajkumar 2021-07-23 07:49:37 UTC
Created attachment 1804790 [details]
upstream - thanos 0.22.0

Comment 5 Arunprasad Rajkumar 2021-07-23 07:50:29 UTC
Upstream thanos 0.22 has a fix for this issue.

https://github.com/thanos-io/thanos/pull/4340

Comment 6 Arunprasad Rajkumar 2021-07-23 10:50:47 UTC
Bumping to thanos v0.22.0 should fix this issue.

Comment 8 Junqi Zhao 2021-07-28 03:50:15 UTC
tested with 4.9.0-0.nightly-2021-07-27-125952, followed steps in Comment 0, could see all the fileds for the rules, thanos version is now 0.22.0
# token=`oc sa get-token prometheus-k8s -n openshift-monitoring`
# oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://thanos-querier.openshift-monitoring.svc:9091/api/v1/query?query=thanos_build_info' | jq '.data.result[].metric | {pod,service,version}'
{
  "pod": "prometheus-k8s-0",
  "service": "prometheus-k8s-thanos-sidecar",
  "version": "0.22.0"
}
{
  "pod": "prometheus-user-workload-0",
  "service": "prometheus-user-workload-thanos-sidecar",
  "version": "0.22.0"
}
{
  "pod": "prometheus-k8s-1",
  "service": "prometheus-k8s-thanos-sidecar",
  "version": "0.22.0"
}
{
  "pod": "prometheus-user-workload-1",
  "service": "prometheus-user-workload-thanos-sidecar",
  "version": "0.22.0"
}
{
  "pod": "thanos-querier-6cc55f54d4-7rsmb",
  "service": "thanos-querier",
  "version": "0.22.0"
}
{
  "pod": "thanos-querier-6cc55f54d4-bqrhf",
  "service": "thanos-querier",
  "version": "0.22.0"
}
{
  "pod": "thanos-ruler-user-workload-1",
  "service": "thanos-ruler",
  "version": "0.22.0"
}
{
  "pod": "thanos-ruler-user-workload-0",
  "service": "thanos-ruler",
  "version": "0.22.0"
}

Comment 16 errata-xmlrpc 2021-10-18 17:35:39 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.9.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-2021:3759