Bug 1973576 - only show annotations.summary field on thanos-ruler Alerts page
Summary: only show annotations.summary field on thanos-ruler Alerts page
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.8
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.9.0
Assignee: Arunprasad Rajkumar
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-18 08:06 UTC by Junqi Zhao
Modified: 2021-10-18 17:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-18 17:35:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
thanos-ruler Alerts page (93.54 KB, image/png)
2021-06-18 08:06 UTC, Junqi Zhao
no flags Details
thanos-ruler Rules page (84.78 KB, image/png)
2021-06-18 08:06 UTC, Junqi Zhao
no flags Details
upstream - thanos 0.22.0 (358.37 KB, image/png)
2021-07-23 07:49 UTC, Arunprasad Rajkumar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-monitoring-operator pull 1297 0 None open Bug 1973576: Bump thanos to v0.22.0 2021-07-23 10:59:17 UTC
Github openshift thanos pull 63 0 None open Bug 1973576: Bump thanos to v0.22.0 2021-07-23 10:49:47 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:35:41 UTC

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


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