简体   繁体   中英

Kibana Timelion plugin how to specify a field in the elastic search

I'm trying to use Timelion plugin for kibana.

I have a dataset in the elasticsearch, the structure may be like this:

{
    "_index": "metrics-2016-03",
    "_type": "gauge",
    "_id": "AVM2O7gbLYPaOnNTBgG0",
    "_score": 1,
    "_source": {
        "name": "kafka.network.RequestChannel.ResponseQueueSize",
        "@timestamp": "2016-03-02T07:29:56.000+0000",
        "value": 4,
        "host": "localhost"
    }
}

I want to show the "value" field as the y axis and "@timestamp" as the x aixs, how should I do?

I tried the .es() function, but this function seems to set the count as the default value, not the "value" field in the datasource.

Timelion uses pre-defined time intervals for its time plots. In order to plot the "value" as function of time you can set the granularity to 'Auto' and use this string:

 .es(metric='max:value')

You can also set the granularity to the minimum possible and add .fit(carry) to the above string in order to fill null values, in that case you can replace max with min or avg , it will produce the same plot ( sum won't work here).

.es(metric='sum:value')

尝试上面,它应该工作正常,请确保您配置timeline.json

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM