Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Bigquery invalid project id error #336

Closed
shankar-bala opened this issue May 10, 2021 · 1 comment
Closed

Bigquery invalid project id error #336

shankar-bala opened this issue May 10, 2021 · 1 comment

Comments

@shankar-bala
Copy link

shankar-bala commented May 10, 2021

Bug Report

Grafana displaying "Invalid project ID error" when trying to generate alerts created via SQL editor using bigquery datasource plugin.

Expected Behavior

To be able to send alert notification using the grafana bigquery datasource

Actual Behavior

This is the same behaviour as mentioned in #303

t=2021-05-10T20:36:03+0000 lvl=info msg="Query run error" logger=plugins.backend pluginId=doitintl-bigquery-datasource Error="googleapi: Error 400: Invalid project ID ''. Project IDs must contain 6-63 lowercase letters, digits, or dashes. Some project IDs also include domain name separated by a colon. IDs must start with a letter and may not end with a dash., invalid"
t=2021-05-10T20:36:03+0000 lvl=eror msg="query BigQueryRun error" logger=plugins.backend pluginId=doitintl-bigquery-datasource Error="googleapi: Error 400: Invalid project ID ''. Project IDs must contain 6-63 lowercase letters, digits, or dashes. Some project IDs also include domain name separated by a colon. IDs must start with a letter and may not end with a dash., invalid"
t=2021-05-10T20:36:03+0000 lvl=eror msg="Alert Rule Result Error" logger=alerting.evalContext ruleId=0 name="Client API Latency alert" error="tsdb.HandleRequest() error rpc error: code = Unavailable desc = transport is closing" changing state to=alerting

Updating to 2.0.2 didnt help either.

Steps to Reproduce the Problem

  1. Deploy helm chart of grafana and install the plugin doitintl-bigquery-datasource @ 2.0.1
  2. Configure bigquery datasource using GCP service account key
  3. Create SQL query and alerts from it.

You may notice "Invalid project ID" error mentioned above

After updating to plugin version doitintl-bigquery-datasource @ 2.0.2 using the zip file - https://github.com/doitintl/bigquery-grafana/releases/download/2.0.2/doitintl-bigquery-datasource-2.0.2.zip getting completely different error and it broke the entire bigquery plugin section..it wont even load the dashboard.

t=2021-05-10T21:34:30+0000 lvl=eror msg="Alert Rule Result Error" logger=alerting.evalContext ruleId=5 name="Client API Latency alert" error="tsdb.HandleRequest() response error &{expected 'query.Location' or 'req.PluginContext.DataSourceInstanceSettings.JSONData.processingLocation' to be set expected 'query.Location' or 'req.PluginContext.DataSourceInstanceSettings.JSONData.processingLocation' to be set A <nil> [] [] 0xc000e92a20}" changing state to=alerting
t=2021-05-10T21:35:30+0000 lvl=eror msg="Alert Rule Result Error" logger=alerting.evalContext ruleId=5 name="Client API Latency alert" error="tsdb.HandleRequest() response error &{expected 'query.Location' or 'req.PluginContext.DataSourceInstanceSettings.JSONData.processingLocation' to be set expected 'query.Location' or 'req.PluginContext.DataSourceInstanceSettings.JSONData.processingLocation' to be set A <nil> [] [] 0xc0011fc090}" changing state to=alerting
t=2021-05-10T21:36:30+0000 lvl=eror msg="Alert Rule Result Error" logger=alerting.evalContext ruleId=5 name="Client API Latency alert" error="tsdb.HandleRequest() response error &{expected 'query.Location' or 'req.PluginContext.DataSourceInstanceSettings.JSONData.processingLocation' to be set expected 'query.Location' or 'req.PluginContext.DataSourceInstanceSettings.JSONData.processingLocation' to be set A <nil> [] [] 0xc00147f560}" changing state to=alerting

Specifications

@ofir5300
Copy link
Collaborator

Hi @shankar-bala,
From reviewing your logs it seems like you did manage to add the relevant GCP project as a datasource, but when configuring an alert rules you omitted the location property which is required (as mentioned in #331).
Try to follow the alert errors supplied when hitting "Test rule" and let me know if it works for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants