Skip to content

Instantly share code, notes, and snippets.

@warthy
Created May 19, 2022 17:48
Show Gist options
  • Save warthy/eb667076c3556c0ea9645a4b136e3417 to your computer and use it in GitHub Desktop.
Save warthy/eb667076c3556c0ea9645a4b136e3417 to your computer and use it in GitHub Desktop.
Events V2 Response example
{
"meta": {
"page": {
"after": "eyJhZnRlciI6IkFnQUFBWURjOGI0QXBQRWRHZ0FBQUFBQUFBQVlBQUFBQUVGWlJHTTRZalJCUVVGRGN6SkRlR2hZVm1Fd1ZVaE9Rd0FBQUNRQUFBQUFNREU0TUdSalpqRXRZbVV3TUMwME9UTm1MVGt6WWpjdE16UmpNakl4TVRsak9UZzUifQ"
}
},
"data": [
{
"attributes": {
"attributes": {
"status": "success",
"event_object": "8c9034ab0909e2c2b05ffd5fd4c80e4e",
"monitor": {
"group_status": 0,
"created_at": 1643639312000,
"transition": {
"transition_type": "alert recovery",
"destination_state": "OK",
"source_state": "Alert"
},
"modified": 1646655224000,
"id": 7061921,
"priority": 0,
"templated_name": "Test log monitor",
"result": {
"result_ts": 1652974181,
"group_key": "@result_id",
"result_id": 593604595308806561,
"alert_url": "/monitors/7061921?to_ts=1652974481000&group=%40result_id%3A593600729835236100&from_ts=1652973281000",
"logs_url": "/logs/analytics?index=notifications-pipeline&to_ts=1652974481000&agg_t=count&agg_m=count&agg_q=%40result_id&from_ts=1652973281000&live=false&query=service%3Amonitor-state-manager+%40result_id%3A%2A00"
},
"groups": [
"@result_id:593600729835236100"
],
"alert_cycle_key": 6521480121421417235,
"query": "logs(\"service:monitor-state-manager @result_id:*00\").index(\"notifications-pipeline\").rollup(\"count\").by(\"@result_id\").last(\"15m\") >= 1",
"message": "message",
"type": "log alert",
"options": {
"notify_audit": false,
"locked": false,
"enable_logs_sample": true,
"thresholds": {
"critical": 1
},
"notify_no_data": false,
"include_tags": true,
"groupby_simple_monitor": false,
"new_group_delay": 0,
"restriction_query": "",
"escalation_message": ""
},
"name": "Test log monitor with some groups jonremy"
},
"service": "undefined",
"title": "[Recovered on {@result_id:593600729835236100}] Test log monitor with some groups jonremy",
"monitor_id": 7061921,
"timestamp": 1652974272000,
"monitor_groups": [
"@result_id:593600729835236100"
],
"priority": "normal",
"sourcecategory": "monitor_alert",
"duration": 900000000000,
"evt": {
"source_id": 36,
"type": "log_alert",
"name": "Test log monitor with some groups jonremy",
"id": "6521495236283621158"
}
},
"message": "Event message",
"tags": [
"result_id:593600729835236100",
"source:alert",
"source:alert",
"monitor",
"result_id:593600729835236100"
],
"timestamp": "2022-05-19T15:31:12Z"
},
"type": "event",
"id": "AgAAAYDc8b4ApPEdGgAAAAAAAAAYAAAAAEFZRGM4YjRBQUFDczJDeGhYVmEwVUhOQwAAACQAAAAAMDE4MGRjZjEtYmUwMC00OTNmLTkzYjctMzRjMjIxMTljOTg5"
}
],
"links": {
"next": "https://api.datad0g.com/api/v2/events?filter%5Bquery%5D=source%3Aalert&page%5Bcursor%5D=eyJhZnRlciI6IkFnQUFBWURjOGI0QXBQRWRHZ0FBQUFBQUFBQVlBQUFBQUVGWlJHTTRZalJCUVVGRGN6SkRlR2hZVm1Fd1ZVaE9Rd0FBQUNRQUFBQUFNREU0TUdSalpqRXRZbVV3TUMwME9UTm1MVGt6WWpjdE16UmpNakl4TVRsak9UZzUifQ&page%5Blimit%5D=1&filter%5Bfrom%5D=now-15m&filter%5Bto%5D=now"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment