Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. [root@test52 ~]# curl -XPUT 'http://localhost:9200/watcher/watch/cluster_health_watch*' -d '{
  2. > "trigger" : {
  3. > "schedule" : { "interval" : "10s" }
  4. > },
  5. > "input" : {
  6. > "http" : {
  7. > "request" : {
  8. > "host" : "localhost",
  9. > "port" : 9200,
  10. > "path" : "/_cluster/health"
  11. > }
  12. > }
  13. > },
  14. > "condition" : {
  15. > "compare" : {
  16. > "status" : { "eq" : "red" }
  17. > }
  18. > },
  19. > "actions" : {
  20. > "send_email" : {
  21. > "email" : {
  22. > "to" : "kartik.unix@gmail.com",
  23. > "subject" : "Cluster Status Warning",
  24. > "body" : "Cluster status is RED"
  25. > }
  26. > }
  27. > }
  28. > }'
  29. {"_index":"watcher","_type":"watch","_id":"cluster_health_watch*","_version":1,"_shards":{"total":2,"successful":2,"failed":0},"created":true}[root@test52 ~]#
  30.  
  31. but I don't see the watch in sense:
  32.  
  33.  
  34. GET .watches/_search
  35. {
  36. "fields" : [],
  37. "query" : {"match_all" : { } }
  38. }
  39.  
  40.  
  41.  
  42. {
  43. "took": 25,
  44. "timed_out": false,
  45. "_shards": {
  46. "total": 1,
  47. "successful": 1,
  48. "failed": 0
  49. },
  50. "hits": {
  51. "total": 0,
  52. "max_score": null,
  53. "hits": []
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement