1xcalibur1

why this no work?

May 8th, 2017
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.94 KB | None | 0 0
  1. {
  2.   "found": true,
  3.   "_id": "windows_errors",
  4.   "_status": {
  5.     "version": 22130,
  6.     "state": {
  7.       "active": true,
  8.       "timestamp": "2017-05-08T07:39:30.797Z"
  9.     },
  10.     "last_checked": "2017-05-08T08:33:22.200Z",
  11.     "last_met_condition": "2017-05-08T07:45:35.282Z",
  12.     "actions": {
  13.       "work": {
  14.         "ack": {
  15.           "timestamp": "2017-05-08T07:45:35.282Z",
  16.           "state": "ackable"
  17.         },
  18.         "last_execution": {
  19.           "timestamp": "2017-05-08T07:45:35.282Z",
  20.           "successful": true
  21.         },
  22.         "last_successful_execution": {
  23.           "timestamp": "2017-05-08T07:45:35.282Z",
  24.           "successful": true
  25.         }
  26.       }
  27.     }
  28.   },
  29.   "watch": {
  30.     "trigger": {
  31.       "schedule": {
  32.         "interval": "30s"
  33.       }
  34.     },
  35.     "input": {
  36.       "search": {
  37.         "request": {
  38.           "search_type": "query_then_fetch",
  39.           "indices": [
  40.             "winlogbeat-{now/d}"
  41.           ],
  42.           "types": [],
  43.           "body": {
  44.             "size": 0,
  45.             "query": {
  46.               "match": {
  47.                 "level": "Information"
  48.               }
  49.             }
  50.           }
  51.         }
  52.       }
  53.     },
  54.     "condition": {
  55.       "compare": {
  56.         "ctx.payload.hits.total": {
  57.           "gt": 0
  58.         }
  59.       }
  60.     },
  61.     "actions": {
  62.       "work": {
  63.         "throttle_period_in_millis": 600000,
  64.         "email": {
  65.           "profile": "standard",
  66.           "attachments": {
  67.             "attached_data": {
  68.               "data": {
  69.                 "format": "json"
  70.               }
  71.             }
  72.           },
  73.           "priority": "high",
  74.           "to": [
  75.             "[email protected]"
  76.           ],
  77.           "subject": " Encountered {{ctx.payload.hits.total}} errors ",
  78.           "body": {
  79.             "text": "Too many Windows Info, see attached data"
  80.           }
  81.         }
  82.       }
  83.     },
  84.     "metadata": {
  85.       "color": "red"
  86.     }
  87.   }
  88. }
Advertisement
Add Comment
Please, Sign In to add comment