Unable to get the values from my JSON data.
my Data :
{"web1":{"Uptime":1295843,"thr":408685,"nx01_01":{"Uptime":157635,"Name":"nx01_01","Bytes":14416383831,"TotalConnections":2},"timestamp": "2016-06-28 09:15:24","Srv":"web1","nx02_01":{"Uptime":423606,"Name":"nx02_01","Bytes":0,"TotalConnections":3},"nx04_01":{"Uptime":496782,"Name":"nx04_01","Bytes":0,"TotalConnections":2},"nx03_01":{"Uptime":496782,"Name":"nx03_01","Bytes":0,"TotalConnections":3}}}
My Elasticsearch Query:
curl -XGET http://localhost:9200/8m1ea8-2016.06.28/_search?pretty? -d '{"size":0,"query":{"filtered":{"query":{"query_string":{"analyze_wildcard":true,"query":"*"}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":"1467112598780","lte":"1467112680435"}}}]}}}},"aggs":{"1":{"terms":{"field":"Name","size":0,"order":{"_term":"asc"}}}}}'
But above query only return single value [ nx04_01 ] instead of showing 4 values . Can you please confirm the above query is correct one.
Output of above query :
"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":0.0,"hits":[]},"aggregations":{"1":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"nx04_01","doc_count":1}]}}}
Expected values: nx01_01,nx02_01,nx03_01,nx04_01.