I want to expose endpoint of Metricbeat system parameters (Same as KIBANA) with the help of NEST to create a page similar to KIBANA dashboard in my application. I want to fetch all the parameters like CPU, Memory, diskio etc. I write following query which gives me latest one hit for cpu parameter
Sorry for late reply, I was busy with other stuff for time being.
I found your suggestion very helpful and write my query with multiple fields now.
Eventually , I found that query gives me result if I club same metricset name fields like memory or CPU. like:
{"range": {
"system.cpu.iowait.pct": {
"gte": 0,
"lt": 1
} }},
{"range": {
"system.cpu.idle.pct": {
"gte": 0,
"lt": 1 }}},
But if I add different metricset name than it wont give anything
{ "range": {
"system.memory.actual.used.pct": {
"gte": 0,
"lt": 1
}}},
{"range": {
"system.cpu.idle.pct": {
"gte": 0,
"lt": 1}}}
Here I add 'Memory' type with 'CPU' so query result is empty
However since your question tends to be more Elasticsearch oriented, you could also ask in Elasticsearch's forum so as to get the most optimised query for your purposes.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.