将节点js与Sentinl Webhook连接

时间:2019-01-26 13:05:00

标签: node.js notifications webhooks

我需要将sentinl Webhook连接到我的应用程序,但不确定如何连接它。安装了kibana和插件。是否有人将node js与sentinl webhook连接起来?下面是观察者的例子..需要一些详细的描述

{
  "_index": "watcher",
  "_type": "watch",
  "_id": "new",
  "_source": {
    "trigger": {
      "schedule": {
        "later": "every 5 minutes"
      }
    },
    "input": {
      "search": {
        "request": {
          "index": [
            "<mos-{now/d}>",
            "<mos-{now/d-1d}>"
          ],
          "body": {}
        }
      }
    },
    "condition": {
      "script": {
        "script": "payload.hits.total > 100"
      }
    },
    "transform": {},
    "actions": {
      "email_admin": {
        "throttle_period": "15m",
        "email": {
          "to": "alarm@localhost",
          "from": "sentinl@localhost",
          "subject": "SENTINL Alarm",
          "priority": "high",
          "body": "Found {{payload.hits.total}} Events"
        }
      },
      "slack_admin": {
        "throttle_period": "15m",
        "slack": {
          "channel": "#kibi",
          "message": "SENTINL Alert! Found {{payload.hits.total}} Events"
        }
      }
    }
  }
}

0 个答案:

没有答案