Create project id as a variable

  • What Grafana version and what operating system are you using?
    Grafana version is 10.0.3 and OS is Ubuntu

  • What are you trying to achieve?
    I want to create a variable.

  • How are you trying to achieve it?
    The service account which I am using as JWT token for Bigquery has access to different projects our GCP account. While creating a variable I selected “query”. In the query field I gave a piece of code. So when I choose the project, that project name should be replaced in the piece of code which I gave and display the respective data.

  • What happened?
    There is no text field to give a name for the variable. Eg. $projectid

  • What did you expect to happen?
    when I choose the project, that project name should be replaced in the place of $projectid in piece of code which I gave and display the respective data.

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    Invalid project ID ‘$projetid’. 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

  • Did you follow any online instructions? If so, what is the URL?