0

I'm trying to figure out how to configure an Azure Monitor datasource for Grafana. What works so far is that the datasource is listed in Grafana when I deploy the stack via HELM.

Azure Monitor Datasource

This is the respective config from my values.yml:

grafana:
  additionalDataSources:
  - name: Azure Monitor
    type: grafana-azure-monitor-datasource
    version: 1
    id: 2
    orgId: 1
    typeLogoUrl: public/app/plugins/datasource/grafana-azure-monitor-datasource/img/logo.jpg
    url: /api/datasources/proxy/2
    access: proxy
    isDefault: false
    readOnly: false
    editable: true
    jsonData:
      timeInterval: 30s
      azureLogAnalyticsSameAs: true
      cloudName: azuremonitor
      clientId: $GF_AZURE_CLIENT_ID
      tenantId: $GF_AZURE_TENANT_ID
      subscriptionId: $GF_AZURE_SUBSCRIPTION_ID

Now, everytime grafana restarts, I'd need to set the client secret again. Is there any way to configure it directly for the startup of Grafana, as well as the Default subscription being used?

rflume
  • 848
  • 5
  • 10

1 Answers1

0

I finally found the missing key:

grafana:
  additionalDataSources:
  - name: Azure Monitor
    ...
    jsonData:
      ...
    secureJsonData: # the missing piece
      clientSecret: $GF_AZURE_CLIENT_SECRET

The client secret has to be passed via secureJsonData.

rflume
  • 848
  • 5
  • 10