Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import datasources #95

Merged
merged 10 commits into from
Dec 30, 2019
Merged

Import datasources #95

merged 10 commits into from
Dec 30, 2019

Conversation

pb82
Copy link
Collaborator

@pb82 pb82 commented Dec 19, 2019

Fixes #75

Adds an optional datasources section to dashboards that allows to map existing datasources to defined inputs in the dashboard. Provides an example for this using keycloak dashboard.

The idea is that an input section in an exported dashboard of:

      "__inputs": [
        {
          "name": "DS_PROMETHEUS",
          "label": "Prometheus",
          "description": "",
          "type": "datasource",
          "pluginId": "prometheus",
          "pluginName": "Prometheus"
        }
      ],

can be mapped to an existing datasource with the name Prometheus using:

...
spec:
  datasources:
    - inputName: "DS_PROMETHEUS"
      datasourceName: "Prometheus"
...

Verification steps:

  1. Deploy Grafana and create the Prometheus example datasource
  2. Create the KeycloakDashboard.yaml example
  3. Open the dashboard and make sure it correctly identifies the datasource (there may still be errors if the datasource fails to find a prometheus instance)

@pb82 pb82 merged commit 6eab7bb into grafana:master Dec 30, 2019
@pb82 pb82 deleted the import-datasources branch December 30, 2019 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

${DS_PROMETHEUS} not processed in Kubernetes GrafanaDashboard kind
1 participant