|
| 1 | +package entity |
| 2 | + |
| 3 | +// GraylogJSON represent json object receive from Graylog notification, see reference at https://docs.graylog.org/en/3.3/pages/alerts.html |
| 4 | +type GraylogJSON struct { |
| 5 | + EventDefinitionID string `json:"event_definition_id"` |
| 6 | + EventDefinitionType string `json:"event_definition_type"` |
| 7 | + EventDefinitionTitle string `json:"event_definition_title"` |
| 8 | + EventDefinitionDescription string `json:"event_definition_description"` |
| 9 | + JobDefinitionID string `json:"job_definition_id"` |
| 10 | + JobTriggerID string `json:"job_trigger_id"` |
| 11 | + Event struct { |
| 12 | + ID string `json:"id"` |
| 13 | + EventDefinitionID string `json:"event_definition_id"` |
| 14 | + EventDefinitionType string `json:"event_definition_type"` |
| 15 | + OriginContext string `json:"origin_context"` |
| 16 | + Timestamp string `json:"timestamp"` |
| 17 | + TimestampProcessing string `json:"timestamp_processing"` |
| 18 | + TimerangeStart string `json:"timerange_start"` |
| 19 | + TimerangeEnd string `json:"timerange_end"` |
| 20 | + Streams []string `json:"streams"` |
| 21 | + SourceStreams []string `json:"source_streams"` |
| 22 | + Alert bool `json:"alert"` |
| 23 | + Message string `json:"message"` |
| 24 | + Source string `json:"source"` |
| 25 | + KeyTuple []string `json:"key_tuple"` |
| 26 | + Key string `json:"key"` |
| 27 | + Priority int64 `json:"priority"` |
| 28 | + Fields map[string]interface{} `json:"fields"` |
| 29 | + } `json:"event"` |
| 30 | + Backlog []struct { |
| 31 | + ID string `json:"id"` |
| 32 | + Index string `json:"index"` |
| 33 | + Source string `json:"source"` |
| 34 | + Message string `json:"message"` |
| 35 | + Timestamp string `json:"timestamp"` |
| 36 | + SteamIDs []string `json:"stream_ids"` |
| 37 | + Fields map[string]interface{} `json:"fields"` |
| 38 | + } `json:"backlog"` |
| 39 | + // Backlog []interface{} `json:"backlog"` |
| 40 | +} |
0 commit comments