Grafana

Explain how we can add Custom configuration to Grafana

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

Grafana docs: The custom configuration can be configured, either by modifying the custom configuration file or by adding environment variables that overrides default configuration. The configuration varies depending on the OS:

  • Windows: There is a file sample.ini in the same directory as the defaults.ini file, copy sample.ini and name it custom.ini. Uncomment the settings you want to override.
  • Linux: Edit the configuration file at /etc/grafana/grafana.ini
  • macOS: Add a configuration file named custom.ini in the conf folder, if you installed Grafana using Homebrew then you can manually edit the conf/defaults.ini
  • Docker: You can override existing configuration in Grafana with environmental variables. An example is setting the Grafana instance name: E.g. export GF_DEFAULT_INSTANCE_NAME=my-instance