Grafana: Import of dashboard using templated datasource does not respect template datasource usage

Created on 28 Jul 2016  路  3Comments  路  Source: grafana/grafana

  • I'm submitting a ...
  • [x] Bug report
  • [ ] Feature request
  • [ ] Question / Support request: Please do not open a github issue. Support Options

Please include this information:

  • What Grafana version are you using?
    3.1
  • What datasource are you using?
    Prometheus (applies generally though)
  • What OS are you running grafana on?
    Linux
  • What did you do?

    • Create a dashboard

    • Add a template variable called $datasource, that selects Prometheus datasources

    • Create a graph, set datasource to $datasource

    • export the dasboard

    • import the dashboard to another grafana

    • I am forced to pick a datasource, so pick one

  • What was the expected result?

    • ideally the graphs on the imported dashboard would still use $datasource

  • What happened instead?

    • They graph datasources are overwritten to use the datasource I selected on import

aredashboard typbug versio3 versio4 versio5

Most helpful comment

Just stumbled upon this when trying to automate the deployment of Grafana using pre-made dashboards.

  • Grafana 4.6.2
  • Prometheus datasource
  • Linux
  • Procedure

    • Created dashboard in a staging Grafana

    • Exported dashboard

    • Imported dashboard in a different Grafana via HTTP API (as used by the Puppet grafana module)

    • Dashboard is empty, complaining about the datasource.

Attempting to import manually via the UI instead of the HTTP API has Grafana prompt me for the datasource. In both the staging and other Grafana instances the Prometheus datasource is simply named prometheus and inspecting the JSON suggests that the __inputs section contains the correct information.

Expected behaviour:

  • That Grafana can actually use its own dashboard exports.

All 3 comments

Just stumbled upon this when trying to automate the deployment of Grafana using pre-made dashboards.

  • Grafana 4.6.2
  • Prometheus datasource
  • Linux
  • Procedure

    • Created dashboard in a staging Grafana

    • Exported dashboard

    • Imported dashboard in a different Grafana via HTTP API (as used by the Puppet grafana module)

    • Dashboard is empty, complaining about the datasource.

Attempting to import manually via the UI instead of the HTTP API has Grafana prompt me for the datasource. In both the staging and other Grafana instances the Prometheus datasource is simply named prometheus and inspecting the JSON suggests that the __inputs section contains the correct information.

Expected behaviour:

  • That Grafana can actually use its own dashboard exports.

Hit this bug with Grafana 5.2.3 using the same method as @phyber

This is a blocker for autoprovisioning.

Closing this issue as I can't repro it on Grafana v7.4.0-pre (db637a3630) using the __Export for sharing externally switch__ and we're trying to limit open GitHub issues in order to better track planned work and features.

image

Thank You to you for taking the time to create this issue!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jackmeagher picture jackmeagher  路  3Comments

Minims picture Minims  路  3Comments

SATHVIKRAJU picture SATHVIKRAJU  路  3Comments

utkarshcmu picture utkarshcmu  路  3Comments

royemmerich picture royemmerich  路  3Comments