Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@test52 ~]# curl -XPUT 'http://localhost:9200/watcher/watch/cluster_health_watch*' -d '{
- > "trigger" : {
- > "schedule" : { "interval" : "10s" }
- > },
- > "input" : {
- > "http" : {
- > "request" : {
- > "host" : "localhost",
- > "port" : 9200,
- > "path" : "/_cluster/health"
- > }
- > }
- > },
- > "condition" : {
- > "compare" : {
- > "status" : { "eq" : "red" }
- > }
- > },
- > "actions" : {
- > "send_email" : {
- > "email" : {
- > "to" : "kartik.unix@gmail.com",
- > "subject" : "Cluster Status Warning",
- > "body" : "Cluster status is RED"
- > }
- > }
- > }
- > }'
- {"_index":"watcher","_type":"watch","_id":"cluster_health_watch*","_version":1,"_shards":{"total":2,"successful":2,"failed":0},"created":true}[root@test52 ~]#
- but I don't see the watch in sense:
- GET .watches/_search
- {
- "fields" : [],
- "query" : {"match_all" : { } }
- }
- {
- "took": 25,
- "timed_out": false,
- "_shards": {
- "total": 1,
- "successful": 1,
- "failed": 0
- },
- "hits": {
- "total": 0,
- "max_score": null,
- "hits": []
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement