Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use custom.ini with Grafana

I'm trying to use a customisation file (custom.ini) for my Grafana installation. Unfortunately this isn't working.

What I have done:

  1. Installed a VM with CentOS 7
  2. Added the Grafana Yum Repo as described in the official documentation
  3. Installed Grafana with

    yum install grafana

  4. Then I created a simple customisation file

    vi /etc/grafana/custom.ini

  5. With this content

    default_theme = light

  6. Restarted Grafana

    systemctl restart grafana-server

Unfortunately the theme has not changed from dark to light.

If I uncomment the same line in the /etc/grafana/grafana.ini then it is working correctly.

Any suggestions? Many Thanks

like image 687
costigator Avatar asked Jun 19 '18 09:06

costigator


People also ask

Where is the Grafana custom INI?

Configuration file location Depending on your OS, your custom configuration file is either the $WORKING_DIR/conf/defaults.ini file or the /usr/local/etc/grafana/grafana.ini file. The custom configuration file path can be overridden using the --config parameter.

How do I enable SMTP in Grafana?

Configure the smtp section of your custom. ini file as follows: Uncomment the enabled line (by removing the semicolon at the beginning of the line) and enter enabled = true. Uncomment the host line and enter host = smtp.


1 Answers

...the parameter is /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini, also the custom.ini is not called at all. ...

You were correct at this point in your comments: a custom.ini file is simply not used. The /etc/grafana/grafana.ini file is the custom config file for your platform (Yum repo = rpm package).

See this comment by Grafana co-founder and the note in this docs section.

like image 122
patricktokeeffe Avatar answered Oct 25 '22 16:10

patricktokeeffe