for the moment i would like to test if the temperature is greater than 0, so i made the following watcher :
{
"trigger": {
"schedule": {
"interval": "60s"
}
},
"input": {
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"monitoring"
],
"types": ,
"body": {
"query": {
"match": {
"_type": "monitoring"Preformatted text
}
}
}
}
}
},
"condition": {
"compare": {
"ctx.payload.hits.hits.temperature ": {
"gt": 0
}
}
},
"actions": {
"email_admin": {
"email": {
"profile": "standard",
"to": [
"'Peere benjamin < benjaminpeere@gmail.com >'"
],
"subject": "{{ctx.watch_id}} executed",
"body": {
"text": "{{ctx.watch_id}} executed with {{ctx.payload.hits.total}} hits"
}
}
}
}
}
do you have any idea of what is wrong?
thanks!
Notice a few things that are different than what you are trying:
There is a notion of time range in the query (query the index for documents in the last X minutes) and there's the threshold condition in the query using another range filter
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.