Settings updates at runtime
Settings updates at runtime allows you to update Grafana settings with no need to restart the Grafana server.
Updates that happen at runtime are stored in the database and override settings from the other sources (arguments, environment variables, settings file, etc). Therefore, every time a specific setting key is removed at runtime, the value used for that key is the inherited one from the other sources in the reverse order of precedence (), being the application default the value used when no one provided through one of these, at least.
Currently, it only supports updates on the auth.saml
section.
You can update settings through the Admin API.
So, the payload of a PUT
request to the update settings endpoint () should contain (either one or both):
- A
removals
list with keys per section you want to unset.
For example, if you provide the following :
it would enable SAML and disable single logouts. And, if you provide the following removals
:
it would remove the key/value setting identified by allow_idp_initiated
within the . So, the SAML service would be reloaded and that value would be inherited for either (settings .ini
file, environment variable, command line arguments or any other accepted mechanism to provide configuration).
In case any of these settings cannot be overridden nor valid, it would return an error and these settings won’t be persisted into the database.
Grafana Enterprise has a built-in scheduled background job that looks into the database every minute for settings updates. If there are updates, it reloads the Grafana services affected by the detected changes.
The background job synchronizes settings between instances in high availability set-ups. So, after you perform some changes through the HTTP API, then the other instances are synchronized through the database and the background job.
If you have enabled, you can control who can read or update settings. Refer to the Admin API for more information.