# How to use Kibana to run Elasticsearch query?

**URL:** https://discuss.elastic.co/t/how-to-use-kibana-to-run-elasticsearch-query/54683
**Category:** Kibana
**Created:** [July 5, 2016, 3:01am UTC](https://discuss.elastic.co/t/how-to-use-kibana-to-run-elasticsearch-query/54683 "2016-07-05T03:01:46Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Kennedy\_Kan1](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kennedy\_Kan1](https://discuss.elastic.co/u/Kennedy_Kan1)
#### Post date: [July 5, 2016, 7:08am UTC](https://discuss.elastic.co/t/how-to-use-kibana-to-run-elasticsearch-query/54683/3 "2016-07-05T07:08:48Z")

</div>

Thanks for the answer. I have first tried it in ES to do some queries. However, I have come across with some issues.

```
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
          }
        }
      }
    }
  }
}

```

This is my command, and I wish to predict 30 days data. I have data input from 2014-12-31 to 2015-05-31, a 15-second basis record for CPU value and I use day as interval here in ES query.

However, when I go through the date start from 2015-06-01, it gives me the following

```
  "key_as_string": "2015-06-01T00:00:00.000Z",
  "key": 1433116800000,
  "doc_count": 0,
  "the_sum": {
    "value": null
  }
},
{
  "key_as_string": "2015-06-02T00:00:00.000Z",
  "key": 1433203200000,
  "doc_count": 0,
  "the_sum": {
    "value": null
  }
},

```

Is that an error or is that normal for ES?

Hi @danielmitterdorfer,

I have forgotten that I have deep dived the issue here; thus, please kindly reply me there if you have a solution instead of replying [How to build charts from Elasticsearch query](https://discuss.elastic.co/t/how-to-build-charts-from-elasticsearch-query/54697/9).

Great thanks.

---

_[View the full topic](https://discuss.elastic.co/t/how-to-use-kibana-to-run-elasticsearch-query/54683)._
