Sensu Events API,搜索查询

时间:2016-02-15 15:58:30

标签: java sensu

我刚刚开始使用Sensu,我知道我们有一个事件API,我们可以在那里检索事件。 由于我习惯了Splunk,我曾经运行搜索查询来检索事件。 我在这里尝试做同样的事情,比如下面的事件,我将如何使用Sensu Events API检索所有 "SN": "1234" 的事件? 我可以吗 ?如果是这样的话?

谢谢, Snabel

{
"id": "2829f9a5-ae0c-4698-b14e-c742cf575802",
"client": {
  "name": "test",
  "address": "x.x.x.x",
  "subscriptions": [
    "test"
  ],
  "version": "x",
  "timestamp": 1454840570
},
"check": {
  "name": "test me",
  "output": "...",
  "status": 1,
  "description": "---LOCAL---",
  "severity": "Informational",
  **"SN": "1234",**
  "executed": 1454840575,
  "issued": 1454840575,
  "history": [
    "1"
  ],
  "total_state_change": 0
},
"occurrences": 1,
"action": "create",
"timestamp": 1454840575
}

0 个答案:

没有答案