如何从Elasticsearch查询构建图表

时间:2016-07-05 08:43:56

标签: elasticsearch kibana elasticsearch-2.0

我有一个能够在类似于https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-movavg-aggregation.html#_prediction

的情况下在Elasticsearch中运行的命令
GET linux_cpu*/_search?search_type=count
{
    "aggs": {
        "my_date_histo": {
            "date_histogram": {
                "field": "@timestamp",
                "interval": "day"
            },
        "aggs": {
            "the_sum": {
                "avg": {
                    "field": "CPU(%)"
                }
            },
            "the_movavg": {
                "moving_avg": {
                    "bucketsPath": "the_sum",
                    "window": 90,
                    "model": "holt_winters",
                    "settings": {
                        "type": "add",
                        "alpha": 0.8,
                        "beta": 0.2,
                        "gamma": 0.7,
                        "period": 30
                     },
                    "predict": 30
                    }
                }
            }
        }
    }
}

但是,我不知道如何根据查询生成图表。任何人都可以帮忙吗?

0 个答案:

没有答案