cloud-logging-data-source-plugin icon indicating copy to clipboard operation
cloud-logging-data-source-plugin copied to clipboard

Ability to set projectId on the dataSource

Open Stono opened this issue 2 years ago • 1 comments

Hi, It'd be great if i could select the projectId on the datasource during provisioning. For context; we run a grafana instance per environment, each environment for us (eg testing, dev, preprod, prod, bcp) is also a separate GCP project.

Ta

Stono avatar Jul 30 '23 07:07 Stono

You should be able to use the plugin config file to specify the default project.

Below is an example:

sudo cat /etc/grafana/provisioning/datasources/logging.yaml

# # config file version
apiVersion: 1

datasources:
  - name: Google Cloud Logging
    type: googlecloud-logging-datasource
    access: proxy
    editable: true
    jsonData:
      #authenticationType: gce
      #gceDefaultProject: shenxiang-gcp-solutions-test1
      authenticationType: jwt
      defaultProject: shenxiang-gcp-solution
      ClientEmail: "[email protected]"
    secureJsonData:
      privateKey: "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADA.........X+q2g=\n-----END PRIVATE KEY-----\n"

xiangshen-dk avatar Oct 03 '23 06:10 xiangshen-dk