Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(grafana): configurable datastore #806

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 45 additions & 28 deletions config/grafana/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {},
Expand Down Expand Up @@ -155,7 +155,7 @@
"type": "row"
},
{
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -264,7 +264,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {},
Expand Down Expand Up @@ -344,7 +344,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {},
Expand Down Expand Up @@ -425,7 +425,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {},
Expand Down Expand Up @@ -506,7 +506,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {},
Expand Down Expand Up @@ -587,7 +587,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {},
Expand Down Expand Up @@ -668,7 +668,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {},
Expand Down Expand Up @@ -749,7 +749,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {},
Expand Down Expand Up @@ -830,7 +830,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {},
Expand Down Expand Up @@ -911,7 +911,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {},
Expand Down Expand Up @@ -1007,7 +1007,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"fieldConfig": {
"defaults": {},
"overrides": []
Expand Down Expand Up @@ -1084,7 +1084,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"fieldConfig": {
"defaults": {},
"overrides": []
Expand Down Expand Up @@ -1162,7 +1162,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"fieldConfig": {
"defaults": {},
"overrides": []
Expand Down Expand Up @@ -1240,7 +1240,7 @@
"mode": "spectrum"
},
"dataFormat": "timeseries",
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"fieldConfig": {
"defaults": {},
"overrides": []
Expand Down Expand Up @@ -1324,7 +1324,7 @@
"type": "row"
},
{
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1406,7 +1406,7 @@
"type": "timeseries"
},
{
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1483,7 +1483,7 @@
"type": "row"
},
{
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1562,7 +1562,7 @@
"type": "timeseries"
},
{
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1646,7 +1646,7 @@
"type": "timeseries"
},
{
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1730,7 +1730,7 @@
"type": "timeseries"
},
{
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -1800,7 +1800,7 @@
"id": 10,
"panels": [
{
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "service time to complete needed actions",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1863,7 +1863,7 @@
"type": "stat"
},
{
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "number of actions per unit time",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1926,7 +1926,7 @@
"type": "stat"
},
{
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"description": "number of actions waiting in the queue to be performed",
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -1999,10 +1999,27 @@
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "Prometheus",
"value": "Prometheus"
},
"hide": 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"hide": 0,
"hide": 2,

So the variable is hidden and the default Prometheus data source is selected

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd think it's better to have this variable visible. For example, one may want to switch between prometheus (with short term storage) and Thanos.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to me. :)

"includeAll": false,
"multi": false,
"name": "DS_PROMETHEUS",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"allValue": null,
"current": {},
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"definition": "label_values(controller_runtime_active_workers{job=\"capsule\"},controller)",
"description": "Select the underlying Controller to get metrics",
"error": null,
Expand All @@ -2029,7 +2046,7 @@
{
"allValue": null,
"current": {},
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"definition": "label_values(rest_client_request_latency_seconds_sum{job=\"capsule\"},url)",
"description": "Kubernetes API endpoint the REST client is interacting with",
"error": null,
Expand All @@ -2056,7 +2073,7 @@
{
"allValue": null,
"current": {},
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"definition": "label_values(rest_client_request_latency_seconds_sum{job=\"capsule\"},verb)",
"description": "Kubernetes API HTTP verb the REST client is interacting with",
"error": null,
Expand All @@ -2083,7 +2100,7 @@
{
"allValue": null,
"current": {},
"datasource": "prometheus",
"datasource": "$DS_PROMETHEUS",
"definition": "label_values(controller_runtime_webhook_requests_in_flight{job=\"capsule\"}, webhook)",
"description": "Capsule webhook",
"error": null,
Expand Down