Storing configuration information for backend datasource plugin

  • What Grafana version and what operating system are you using?
    latest

  • What are you trying to achieve?
    I want to store configuration information for my backend datasource plugin. This configuration must be modifiable by the user and my backend datasource plugin must be able to read this configuration information (such as retryCount, refreshInterval etc)

  • How are you trying to achieve it?
    I want to store in a Grafana recommended way of storing configuration information so that I can read it in my backend plugin (golang).

  • What happened?
    Don’t know any definite way to accomplish the above.

  • What did you expect to happen?
    Store configuration information in a standard way recommended by Grafana for backend datasource plugins.

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

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    NA

  • Did you follow any online instructions? If so, what is the URL?
    NA

How about storijg it in a config file in the folder if the plugin?

Thats simple. Appreciate. But just want to know whether any other approaches are recommended because our Grafana (and the backend plugin) runs as a docker container.

1 Like

You are developing a grafana plugin right?

Unless you want to try environmemt variables you can set up in your docker file etc

@sivauk1 Configuration for any data source plugins should be stored in the JsonData and JsonSecureData of the plugin. It can be easily modified by the user in the Data Source Configuration on the front end or Provisioned.

@ mikhailvolkov: Thanks. Actually there are certain flags that we need to set/uset and a config file looks to be the best alternative.

1 Like