How to properly configure Mimir data source in Grafana?

Is there any documentation on how to properly write a data source configuration (YAML) for Mimir as a data source? So far I’ve got something like this:

      - name: Mimir
        type: prometheus
        access: proxy
        url: <http://mimir-gateway.mimir.svc:80/prometheus>
        isDefault: false
        jsonData:
          prometheusType: mimir
          tlsSkipVerify: true
          timeout: 30```


However, `prometheusType` does not reflect in the Data Sources view in Grafana, and I'm not sure how I can potentially set other fields such as Mimir Version.

Sorry, don’t know how to do that exactly (I’d try use type: mimir or so) but you can always try to create a “dummy” mimir by hand, then (using api) get all the datasources and see how the mimir one is stored :smile:

Good point, thank you for the hint. I’ve already tried creating a Mimir data source by hand, but couldn’t find its declaration. Didn’t think of the Grafana API. I’ll give it a try. (btw: type is actually prometheus, works so far, I was just wondering about the other possible configuration options) - I’ll keep you posted.

Sorry, I though that mimir was different datasource in Grafana (had their own page etc) :sweat_smile:

Got it - it should look sth like this:

      - name: "Mimir"
        uid: "mimir"
        type: "prometheus"
        access: "proxy"
        url: "<http://mimir-gateway.mimir.svc:80/prometheus>"
        isDefault: false
        jsonData:
          httpMethod: "POST"
          prometheusType: "Mimir"
          prometheusVersion: "2.9.1"
          tlsSkipVerify: true
          timeout: 30```

~At least that’s how Grafana stores those values. When set in an externally (ConfigMap, triggers Config-Reloader) provisioned data source, the detail values do not reflect in the Grafana UI, but I’m not sure if that’s rather a ‘cosmetic’ issue.~ (Never mind - that was based on a typo in the config. Works as expected now.) Thanks again. :slightly_smiling_face: