Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "trigger":{
- "schedule":{
- "interval":"1m"
- }
- },
- "input":{
- "search":{
- "request":{
- "search_type":"query_then_fetch",
- "indices":[
- "iburgerzaken-blueriq-*"
- ],
- "rest_total_hits_as_int":true,
- "body":{
- "query":{
- "bool":{
- "filter":[
- {
- "range":{
- "@timestamp":{
- "from":"now-1m",
- "to":"now"
- }
- }
- }
- ]
- },
- "match":{
- "message":{
- "query":"Invalid date format pattern 'DD-MM-YYYY'"
- }
- }
- }
- }
- }
- }
- },
- "condition":{
- "compare":{
- "ctx.payload.hits.total.value":{
- "gt":0
- }
- }
- },
- "actions":{
- "email_administrator":{
- "email":{
- "profile":"standard",
- "attachments":{
- "attached_data":{
- "data":{
- "format":"json"
- }
- }
- },
- "priority":"high",
- "to":[
- "email@email.com"
- ],
- "subject":"Error: Invalid date format pattern 'DD-MM-YYYY' has occured {{ctx.payload.hits.total.value}} times",
- "body":{
- "text":"Alert for error: Invalid date format pattern 'DD-MM-YYYY'. See attached data for in depth information"
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement