Bug 1962062

Summary: Monitoring dashboards should support default values of "All"
Product: OpenShift Container Platform Reporter: Andrew Pickering <anpicker>
Component: MonitoringAssignee: Andrew Pickering <anpicker>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.8CC: alegrand, anpicker, aos-bugs, erooth, jfajersk, kakkoyun, pkrupa
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:09:09 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
Kubernetes / Networking / Namespace (Pods) dashboard
none
Kubernetes / Networking / Pod dashboard none

Comment 4 Junqi Zhao 2021-05-24 02:26:35 UTC
tested with 4.8.0-0.nightly-2021-05-21-233425, there are 3 dashboards on "Monitoring -> Dashboards" have dropdown filters that should default to "All", but
Kubernetes / Networking / Pod -> Namespace field should default to "All", but it sets the default to the first value in the list, usually openshift-apiserver
Kubernetes / Networking / Namespace (Pods) -> Namespace field should default to "All", but it sets the default to the first value in the list, usually openshift-apiserver
Prometheus / Overview -> Job,Instance fields default to "All", no issue for this dashboard

Comment 5 Junqi Zhao 2021-05-24 02:27:46 UTC
Created attachment 1786233 [details]
Kubernetes / Networking / Namespace (Pods) dashboard

default value is openshift-apiserver

Comment 6 Junqi Zhao 2021-05-24 02:28:34 UTC
Created attachment 1786234 [details]
Kubernetes / Networking / Pod dashboard

default value is openshift-apiserver

Comment 7 Andrew Pickering 2021-05-24 08:35:04 UTC
This looks like the expected behavior.

We only use "All" as the default value when the dashboard definition explicitly states that we should. Grafana seems to have a different behavior of also defaulting to "All" when no default is specified.

Specifically, we are looking for the following in the JSON dashboard definition:

"current": {
  "selected": true,
  "value"" "$__all",
}

Comment 9 Junqi Zhao 2021-05-25 06:48:13 UTC
based on Comment 7, only the "Prometheus / Overview" dashboard, which use the grafana-dashboard-prometheus configmap has the JSON dashboard definition:

"current": {
  "selected": true,
  "value"" "$__all",
}

and Job,Instance fields default to "All", set to VERIFIED

Comment 12 errata-xmlrpc 2021-07-27 23:09:09 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.8.2 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:2438