Save & test datasources after k8s pod restarts

Hello all,

First of, thanks for a great app. Love Grafana!

The setup:
Grafana deployed in kubernetes (EKS) and reading data from multiple Amazon Managed Prometheus (AMP)

The issue:
Every time grafana restarts (for some reason like pods can do) I have to manually go in and “Save and test” the datasources for them to be able to show data in the dashboards that we have.

Here is an config we use as an example

  - name: Dev-Prometheus
    type: prometheus
    url: <super-secret-amp-url>
    access: proxy
    editable: true
    orgID: 1
    jsonData:
    #https://grafana.com/docs/grafana/latest/administration/provisioning/
      sigV4Auth: true
      sigV4Region: <a-region-we-use>
      sigV4AssumeRoleArn: <super-secret-arn:aws:iam>
      manageAlerts: false

Have anyone expirenced something like this before? Can’t seem to find any relavant information. Does it exists any better way to “automatically” save and test one or more datasources when a pod restarts?

1 Like

Hi
I’m facing the same problem
apiVersion: 1
datasources:

  • access: proxy
    editable: true
    isDefault: true
    jsonData:
    sigV4Auth: true
    sigV4Region:
    name: prometheus-amp
    type: prometheus
    url:

Try adding:

sigV4AuthType: default

Like this:

sigV4Auth: true
sigV4AuthType: default
sigV4Region: eu-central-1

Worked for us.
All credits goes to my awesome coworker! :slight_smile: