k3-ota
(Kazuhide Ota)
August 29, 2016, 6:38am
1
I create an index and input a the following json data.
$ cat test1.json
{"index":{"_index":"test1","_type":"type1","_id":"dd36d076-55bc-4185-a273-6edeeb700877"}}
{"%CPU %MEM COMMAND":"21 0.1 /bin/bash"}
{"index":{"_index":"test1","_type":"type1","_id":"b0257daf-656b-4f55-aba9-dce5e422a0f6"}}
{"%CPU %MEM COMMAND":"100 20M /java"}
{"index":{"_index":"test1","_type":"type1","_id":"900e7798-b6c7-49ca-b6dd-df22d5311c7c"}}
{"%CPU %MEM COMMAND":"52 5M /matome.sh"}
However, I create the graph and want to see no fileter data on kibana.
How can I solve problem?
Best regards,
Kazu
k3-ota
(Kazuhide Ota)
August 29, 2016, 6:40am
2
When I input a data, I use the following command.
curl -XPUT http://localhost:9200/test1 -d @test1.json
[test1.json]
{"index":{"_index":"test1","_type":"type1","_id":"dd36d076-55bc-4185-a273-6edeeb700877"}}
{"%CPU %MEM COMMAND":"21 0.1 /bin/bash"}
{"index":{"_index":"test1","_type":"type1","_id":"b0257daf-656b-4f55-aba9-dce5e422a0f6"}}
{"%CPU %MEM COMMAND":"100 20M /java"}
{"index":{"_index":"test1","_type":"type1","_id":"900e7798-b6c7-49ca-b6dd-df22d5311c7c"}}
{"%CPU %MEM COMMAND":"52 5M /matome.sh"}
Data that you want to graph must be separated into different fields. Kibana (Elasticsearch, really) can't do anything with
{"%CPU %MEM COMMAND":"21 0.1 /bin/bash"}
but with
{"cpu": 21, "mem": 0.1, "command": "/bin/bash"}
it can.
k3-ota
(Kazuhide Ota)
August 29, 2016, 7:03am
4
Thank you for your detial reply!
I see.
That is, I need to convert its data.
In this case, the quantity of data is slight, so the conversion is easy.
But, if imore and more it is, conversion is more difficult...