Skip to content

Commit

Permalink
Fully removes doitintl BigQuery datasource references (#1049)
Browse files Browse the repository at this point in the history
* Updates SwitchOverview dashboard to use lastest graph type

The dashboard was using the old, deprecated "Graph (old)" panel types, which
were deprecated a long time ago in favor of the newer, more performant "Time
Series" panel type. I simply clicked the "Migrate" button in each of the
panels, and Grafana seems to have handled the rest.

* Updates Grafana to v11.1.0

* Updates Prometheus to v2.53.1

* Adds old doitintl BQ plugins to list of datasources to delete

These were replaced by a native Grafana BigQuery datasource plugin.

* Changes all BigQuery datasource types of doitintl to grafana

The doitintl version of the Grafana BigQuery datasource plugin is deprecated
(or even removed) in favor of the native version maintained by Grafana. A while
we (I?) had migrated all dashboards to use the Grafana maintained plugin, I
think, but there were still a few dashboard referencing it for some reason.
This commit removes those references and replaces them with references to the
Grafana BQ plugin.

Additionally this commit outright removes the templates for the doitintl BQ
datasource plugin.

* Adds new prune:true config to auto delete provisioned datasources

As of this version (v11.1.x) Grafana apparently supports automatically removing
provisioned datasources when the provisioning source for the datasource no
longer exists. This should hopefully obviate the need for the deleteDatasources
configuration.

* Adds back deleteDatasources, but only with existing datasources

No need to keep already-deleted datasources in the array.

* Adds manageAlerts:false to all Prometheus datasources

It's possible this setting is true by default, which seems like it might be
causing Grafana to query the API for a list of rules, which returns a 404,
which in turn causes an obscure "Not found" popup in the Grafana display.

* Temporarily enable login form

* Temporarily disable auth.proxy for Grafana

* Re-disabled login form, and re-enables auth.proxy

* Removes deprecated legacy [alerting] option

* Bumps Grafana to latest patch version v11.1.3

* Removes manageAlerts:false from all datasources

I had added this configuration in the hopes that it would clear up a 404 error
that Grafana was hitting on the Home page, but it didn't work. It turns out
what I was seeing was a bug, which was correct:

grafana/grafana#89905
  • Loading branch information
nkinkade authored Aug 5, 2024
1 parent 59bd2b7 commit 2ab87b5
Show file tree
Hide file tree
Showing 13 changed files with 640 additions and 644 deletions.
24 changes: 12 additions & 12 deletions config/federation/grafana/dashboards/GCP_Billing.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${bqSource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -238,7 +238,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${bqSource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -409,7 +409,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${bqSource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -550,7 +550,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${bqSource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -693,7 +693,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${bqSource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -846,7 +846,7 @@
},
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${bqSource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -900,7 +900,7 @@
},
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${bqSource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -1073,7 +1073,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${bqSource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -1214,7 +1214,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${bqSource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -1357,7 +1357,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${bqSource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -1425,7 +1425,7 @@
"value": "measurement-lab"
},
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${bqSource}"
},
"definition": "",
Expand Down Expand Up @@ -1626,4 +1626,4 @@
"uid": "a5mC51ZMk",
"version": 59,
"weekStart": ""
}
}
22 changes: 11 additions & 11 deletions config/federation/grafana/dashboards/NDT_EarlyExit.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -215,7 +215,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -369,7 +369,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -511,7 +511,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -650,7 +650,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -790,7 +790,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -932,7 +932,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -1072,7 +1072,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -1164,7 +1164,7 @@
]
},
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"definition": "SELECT SUBSTR(server.Site, 0, 3) AS metro,\nFROM ndt.ndt7\nWHERE date >= \"2023-09-01\"\nGROUP BY metro\nORDER BY metro",
Expand Down Expand Up @@ -1192,7 +1192,7 @@
]
},
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"definition": "SELECT server.Site AS site,\nFROM ndt.ndt7\nWHERE date >= \"2023-09-01\"\nAND REGEXP_CONTAINS(SUBSTR(server.Site, 0, 3), '${metro:regex}')\nGROUP BY site\nORDER BY site",
Expand Down Expand Up @@ -1276,4 +1276,4 @@
"uid": "W8JPPzzIz",
"version": 39,
"weekStart": ""
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -215,7 +215,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -329,7 +329,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -469,7 +469,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -205,7 +205,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -321,7 +321,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -430,7 +430,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -547,7 +547,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down Expand Up @@ -684,7 +684,7 @@
"targets": [
{
"datasource": {
"type": "doitintl-bigquery-datasource",
"type": "grafana-bigquery-datasource",
"uid": "${datasource}"
},
"editorMode": "code",
Expand Down
Loading

0 comments on commit 2ab87b5

Please sign in to comment.