Just a mark to investigate the reason configuration file of Timelion plugin is not working. It is maybe a designed feature. :)
Background
In Kibana 5.X, (specially Kibana 5.3.3 in my case), I have configured the timelion.json into the following:
{
"quandl": {
"key": "someKeyHere"
},
"es": {
"timefield": "timestamp",
"default_index": "qos*"
},
"graphite": {
"url": "http://devops-graphite.prod.hulu.com"
},
"default_rows": 2,
"default_columns": 2,
"max_buckets": 2000,
"target_buckets": 200
}
The significant change is timefield: @timestamp
to timefield: timestamp
. This does not work since an ad hoc query in timelion still says the default timefield is @timestamp
.
Solution
Actually, after timelion is merged into kibana project, its default configuration comes from two sources:
- Kibana default UI Setting configuration: https://github.com/elastic/kibana/blob/5.3/src/ui/settings/defaults.js#L272
- Timelion configuration: https://github.com/elastic/kibana/blob/5.3/src/core_plugins/timelion/timelion.json
And the first configuration would override the seconds configuration. As we can check here: https://github.com/elastic/kibana/blob/5.3/src/core_plugins/timelion/server/routes/run.js#L23
const tlConfig = require('../handlers/lib/tl_config.js')({
server,
request,
settings: _.defaults(uiSettings, timelionDefaults) // Just in case they delete some setting.
With this being said, to modify the default setting for timelion, you are supposed to do modification in Kibana’s default UI setting.
If you persist to make your changes only in timelion.json
, then you might change the above snip to the following:
const tlConfig = require('../handlers/lib/tl_config.js')({
server,
request,
settings: _.defaults(timelionDefaults, uiSettings) // Prefer the settings in timelion.json.
Contact me
If you get any question, you are welcome to contact me via:
- email: nisxiya@yeah.net
- wechat: nisxiya