Grafana CLI dashboard and datasource manipulation

  • What Grafana version and what operating system are you using?
    Grafana 8.2.1 on Linux with Docker

  • What are you trying to achieve?
    Dynamically control the dashboards and datasources using API/CLI.

  • How are you trying to achieve it?
    grafana-cli, there might be a way with API but I’m not sure why.

  • What happened?
    The CLI tool is pretty limited.

  • What did you expect to happen?
    So I’ll be able to export/import dashboard and manipulate datasources.

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    Nope, I can do it in the UI, it’s useless.

  • Did you follow any online instructions? If so, what is the URL?
    Grafana CLI | Grafana documentation


Are you using python or?
Can you post what you did and what is not working?

ጤና ይስጥልኝ,
I’m using exec on the regular docker container, I’m launching the CLI tool using grafana-cli.

I’m trying to list and export the dashboards or manipulate data sources and this tool doesn’t support these kinds of operations.

ፒስ ነው?

Maybe what you really want is use the grafana api for that kind of stuff

1 Like