Last active
February 14, 2017 10:04
-
-
Save michaelkeevildown/133cb26142c905c5042ef176f711b71a to your computer and use it in GitHub Desktop.
Watcher - v2.3 - Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"trigger": { | |
"schedule": { | |
"interval": "1m" | |
} | |
}, | |
"input": { | |
"search": { | |
"request": { | |
"indices": "##INDEX##", | |
"types": "##TYPE##", | |
"body": { | |
##QUERY IN HERE## | |
} | |
} | |
} | |
}, | |
"throttle_period": "30m", ## Not sure if you want this### | |
"condition": { | |
"compare" : { "ctx.payload.hits.total" : { "gt" : 0 }} | |
}, | |
"actions": { | |
"index_payload" : { | |
"index": "##INDEX NAME HERE##", | |
"doc_type": "## TYPE HERE##" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment