Hi,
I am trying to create a watch for monitoring the system metrics ( for e.g load, Memory or disk usage) and send notifications when certain threshold is breached along with the beatname details.
Currently have the below watch script which is working but not showing up the server name. So looking for your help ..
this is not a question about watcher, but merely about how to write a query, that also includes such information. For this concrete example you will need an aggregation, that will count the occurence of each beat.hostname value in the documents that match. For this you do need a terms aggregation. You can check out the documentation over here. Once you got this aggregation right, you can loop through the array of returned buckets and use each found hostname in the bucket. You might want to check out the mustache docs for this https://mustache.github.io/mustache.5.html
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.