Advanced settings via config file possible?


#1

Hello there!

Is it possible to set the advanced settings (e.g. doc_table:highlight or state:storeinSessionStorage) via config file?
I'm doing a lot of testing right now, which also involves an occasional fresh installation and therefore it would be very neat to be able to set my favorite advanced settings when Kibana starts up. Otherwise I do stuff and then realize, that I forgot to change some settings. :slight_smile:

Thanks in advance and best regards!


(Shaunak Kashyap) #2

Setting these via the config file is not possible. These settings actually get stored in Elasticsearch itself, in a special index (default is .kibana). So what you could do, while you are testing, is something like this:

  1. Set all the advanced settings as you want via the Kibana UI
  2. Grab the JSON document from Elasticsearch where these settings are stored. For this make an HTTP GET request to http://localhost:9200/.kibana/config/_search (assuming you have Elasticsearch running on localhost:9200; replace if necessary). This should return a document (under hits) corresponding to your version of Kibana, something that looks like this:
 {
    "_index": ".kibana",
    "_type": "config",
    "_id": "5.1.1",
    "_score": 1.0,
    "_source": {
      "buildNum": 14566,
      "defaultIndex": "logstash-*",
      "discover:aggs:terms:size": 20,
      "discover:sampleSize": "1500"
    }
  }
  1. Grab the _source part of the document and save it somewhere.
  2. Next time you install Kibana fresh, start up the Kibana server (so this special index in Elasticsearch is initialized properly). Then index your saved document back into Elasticsearch by sending an HTTP PUT request to http://localhost:9200/.kibana/config/<your kibana version, e.g. 5.1.1> with the body as the saved document. Note that if you are installing a different version of Kibana from the one you saved the settings from, this may not work.

Hope this helps!


#3

Thanks! I'll try that out next time!

Best regards!


(system) #4

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