Documentation
¶
Overview ¶
Package event provides the event type and its serialization to the DD agent 5 intake format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertType ¶ added in v0.55.0
type AlertType string
AlertType represents the alert type of an event
const ( AlertTypeError AlertType = "error" AlertTypeWarning AlertType = "warning" AlertTypeInfo AlertType = "info" AlertTypeSuccess AlertType = "success" )
Enumeration of the existing event alert types, and their values
func GetAlertTypeFromString ¶
GetAlertTypeFromString returns the AlertType from its string representation
type Event ¶
type Event struct {
Title string `json:"msg_title"`
Text string `json:"msg_text"`
Ts int64 `json:"timestamp"`
Priority Priority `json:"priority,omitempty"`
Host string `json:"host"`
Tags []string `json:"tags,omitempty"`
AlertType AlertType `json:"alert_type,omitempty"`
AggregationKey string `json:"aggregation_key,omitempty"`
SourceTypeName string `json:"source_type_name,omitempty"`
EventType string `json:"event_type,omitempty"`
OriginInfo taggertypes.OriginInfo `json:"-"` // OriginInfo is not serialized, it's used for origin detection
}
Event holds an event (w/ serialization to DD agent 5 intake format)
type Priority ¶ added in v0.55.0
type Priority string
Priority represents the priority of an event
Enumeration of the existing event priorities, and their values
func GetEventPriorityFromString ¶
GetEventPriorityFromString returns the Priority from its string representation
Click to show internal directories.
Click to hide internal directories.