Hi, @spinscale
I'm having trouble with settings alerts for my memory usage. I'm using Metricbeat which is stashing only the memory metrics to Elasticsearch.
This is the JSON for the watch that I've configured:
I need that outputs to show hosts and values.
Example.
" Hosts with HIGH MEMORY USAGE (above 75%): hosts1 Memory Usage is at: 80.65%, hosts2 Memory Usage is at: 87.13% "
or
" Hosts with HIGH MEMORY USAGE (above 75%): hosts1,hosts2,hosts3 Memory Usage is at: 80.65%, 87.13%, 76.01% "
I do not understand where your exact problem is at the moment. When you take a look at your aggregation, there is only an aggregation on the hostname, so this is the data you are getting from the search response. If you want to also get the memory usage, you may need to add another sub-aggregation that calculates max or average of the memory field in your data.
First start with the query, and only if that contains all the results, start writing a watch. The tricky part is usually the query, not the watch itself.
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.