我刚开始使用 Sensu,我知道我们有一个事件 API,我们可以在其中检索事件。由于我习惯了 Splunk,我曾经运行搜索查询来检索事件。我在这里尝试做同样的事情,假设我得到了下面的事件,我将如何使用 Sensu Events API 检索所有具有的事件"SN": "1234"
?我可以吗 ?如果是这样怎么办?
谢谢,斯内贝尔
{
"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
}