Setting advanced settings - env? kibana.yml? curl?

Is there a way to specify these settings (especially dateFormat:tz) in either the env or in kibana.yml?

Alternatively, is there a way to query for and update these settings via curl? Can you provide an example of the correct syntax?

to (partially) answer my own question, doing it via curl:

ā†’ curl -s http://localhost:5601/api/kibana/settings | jq '.settings."dateFormat:tz".userValue'
null

ā†’ curl -sX POST -H 'kbn-xsrf: 1' -H 'content-type: application/json'  http://localhost:5601/api/kibana/settings -d '{"changes":{"dateFormat:tz":"utc"}}'
{"settings":{"buildNum":{"userValue":19459},"defaultIndex":{"userValue":"00000000-0000-0000-0000-598b7d7dd7e3"},"dateFormat:tz":{"userValue":"utc"}}}

ā†’ curl -s http://localhost:5601/api/kibana/settings | jq '.settings."dateFormat:tz".userValue'
"utc"

ā†’ curl -sX POST -H 'kbn-xsrf: 1' -H 'content-type: application/json'  http://localhost:5601/api/kibana/settings -d '{"changes":{"dateFormat:tz":null}}'
{"settings":{"buildNum":{"userValue":19459},"defaultIndex":{"userValue":"00000000-0000-0000-0000-598b7d7dd7e3"}}}

ā†’ curl -s http://localhost:5601/api/kibana/settings | jq '.settings."dateFormat:tz".userValue'
null

You are right, using the Kibana API is the way to go here. There is no way to specify it in env/kibana.yml.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.