Skip to content

Instantly share code, notes, and snippets.

@inqueue
Created February 29, 2016 21:58
Show Gist options
  • Save inqueue/a7887fa8ea59584abb94 to your computer and use it in GitHub Desktop.
Save inqueue/a7887fa8ea59584abb94 to your computer and use it in GitHub Desktop.
watching for yellow
{
"trigger": {
"schedule": {
"interval": "60s"
}
},
"input": {
"http": {
"request": {
"host": "localhost",
"port": 9200,
"path": "/_cluster/health"
}
}
},
"condition": {
"compare": {
"ctx.payload.status": {
"eq": "yellow"
}
}
},
"actions": {
"send_email": {
"email": {
"to": "someone@somemail.com",
"subject": "Elasticsearch YELLOW cluster status",
"body": "Yellow status on Elasticsearch cluster",
"attach_data": true,
"priority": "high"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment