How To filter & count documents and show data table?

Data

I have these kind of data.(And I have converted csv to json and POSTed to ElasticSearch.)

# csv
          timestamp,     name, value1, value2
2019-05-27T00:00:00, "NAME_1",      0,   2.30
2019-05-27T00:00:00, "NAME_2",      1,   4.78
2019-05-27T00:10:00, "NAME_1",      0,   3.92
....

# json
{[
    {
        "timestamp": "2019-05-27T00:00:00",
        "name": "NAME_1",
        "value1": 0,
        "value2": 2.30
    },
    {
        ...
    }
]}

Expectation

I want to visualize these data as "Data Table" on Kibana.
How I should write JSON input?

(I cannot find related examples for independent filtering.)

|     name | Count(value1>=3) | Count(value2>=5.0) |
| -------- | ---------------- | ------------------ |
| "NAME_1" |               10 |                360 |
| "NAME_2" |              123 |                600 |

etc

  • Elasticsearch & Kibana Version = 6.7.1

You'll want to post each record as its own document, most likely. Here's an example using the Kibana Dev Tools, but you can do this in many ways.

POST myindex/_doc
{
    "timestamp": "2019-05-27T00:00:00",
    "name": "NAME_2",
    "value1": 0,
    "value2": 2.30
}

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