Elastic action script

I am thinking to solve the correlation problem.
All of the log will store at ElasticSearch, and I would like to find the logs that appears > 5 times with a period then it will take a action to send the command to devices.
Is there any action script / plugin to send some commands to another shell / server / router/ switch?

The recently announced Elastic Watcher product does exactly this. If you already run a monitoring system like Nagios it's also easy to write a check that queries Elasticsearch at certain intervals.