Skip to content

Commit

Permalink
project field can now list project names
Browse files Browse the repository at this point in the history
If `CeilometerEnableTenantDiscovery` is enabled, ceilometer samples
will contain `project_name` field, values from which are populated
in `project` field.

This change affects 2 dashboards, 'Cloud View' and 'Virtual Machine View',
only these allow switching between openstack projects.

If samples are missing `project_name` field, the regex for `project`
variable allows fallback to `project` field
  • Loading branch information
yadneshk committed Feb 27, 2024
1 parent 6568039 commit 512ea6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions roles/servicetelemetry/files/rhos-cloud-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@
"value": "$__all"
},
"datasource": "STFPrometheus",
"definition": "label_values(ceilometer_cpu{service=~\".+-$clouds-.+\"},project)",
"definition": "ceilometer_cpu{service=~\".+-$clouds-.+\"}",
"description": null,
"error": null,
"hide": 2,
Expand All @@ -1472,11 +1472,11 @@
"name": "projects",
"options": [],
"query": {
"query": "label_values(ceilometer_cpu{service=~\".+-$clouds-.+\"},project)",
"query": "ceilometer_cpu{service=~\".+-$clouds-.+\"}",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": "",
"regex": "/project_name=\"(?<text>[^\"]+)|project=\"(?<value>[^\"]+)/g",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
Expand Down
6 changes: 3 additions & 3 deletions roles/servicetelemetry/files/virtual-machine-view.json
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@
{
"allValue": null,
"datasource": null,
"definition": "label_values(ceilometer_cpu{service=~\".+-$clouds-.+\"}, project)",
"definition": "ceilometer_cpu{service=~\".+-$clouds-.+\"}",
"description": null,
"error": null,
"hide": 0,
Expand All @@ -1072,11 +1072,11 @@
"name": "project",
"options": [],
"query": {
"query": "label_values(ceilometer_cpu{service=~\".+-$clouds-.+\"}, project)",
"query": "ceilometer_cpu{service=~\".+-$clouds-.+\"}",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"regex": "/project_name=\"(?<text>[^\"]+)|project=\"(?<value>[^\"]+)/g",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
Expand Down

0 comments on commit 512ea6b

Please sign in to comment.