event

package
v0.52.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Title            string         `json:"msg_title"`
	Text             string         `json:"msg_text"`
	Ts               int64          `json:"timestamp"`
	Priority         EventPriority  `json:"priority,omitempty"`
	Host             string         `json:"host"`
	Tags             []string       `json:"tags,omitempty"`
	AlertType        EventAlertType `json:"alert_type,omitempty"`
	AggregationKey   string         `json:"aggregation_key,omitempty"`
	SourceTypeName   string         `json:"source_type_name,omitempty"`
	EventType        string         `json:"event_type,omitempty"`
	OriginFromUDS    string         `json:"-"`
	OriginFromClient string         `json:"-"`
	Cardinality      string         `json:"-"`
}

Event holds an event (w/ serialization to DD agent 5 intake format)

func (*Event) String

func (e *Event) String() string

Return a JSON string or "" in case of error during the Marshaling

type EventAlertType

type EventAlertType string

EventAlertType represents the alert type of an event

const (
	EventAlertTypeError   EventAlertType = "error"
	EventAlertTypeWarning EventAlertType = "warning"
	EventAlertTypeInfo    EventAlertType = "info"
	EventAlertTypeSuccess EventAlertType = "success"
)

Enumeration of the existing event alert types, and their values

func GetAlertTypeFromString

func GetAlertTypeFromString(val string) (EventAlertType, error)

GetAlertTypeFromString returns the EventAlertType from its string representation

type EventPriority

type EventPriority string

EventPriority represents the priority of an event

const (
	EventPriorityNormal EventPriority = "normal"
	EventPriorityLow    EventPriority = "low"
)

Enumeration of the existing event priorities, and their values

func GetEventPriorityFromString

func GetEventPriorityFromString(val string) (EventPriority, error)

GetEventPriorityFromString returns the EventPriority from its string representation

type Events

type Events []*Event

Events is a collection of Event.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL