Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -XPUT 'http://test45:9200/_watcher/watch/httpd_log_error_watch' -d '{
- "trigger" : { "schedule" : { "interval" : "10s" } },
- "input" : {
- "search" : {
- "request" : {
- "indices" : [ "httpdlogs-" ],
- "body" : {
- "query" : {
- "match" : { "message": "404" }
- }
- }
- }
- }
- },
- "condition" : {
- "compare" : { "message" : { "lte" : 404 }}
- },
- "actions" : {
- "email_administrator" : {
- "email" : {
- "to" : "kartik@kartikv.com",
- "subject" : "Encountered {{message}} 404 errors",
- "body" : "404 error in the weblog",
- }
- }
- }
- }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement