Documentation ¶
Index ¶
Constants ¶
const ( TypeAcknowledgementCleared = "acknowledgement-cleared" TypeAcknowledgementSet = "acknowledgement-set" TypeCustom = "custom" TypeDowntimeEnd = "downtime-end" TypeDowntimeRemoved = "downtime-removed" TypeDowntimeStart = "downtime-start" TypeFlappingEnd = "flapping-end" TypeFlappingStart = "flapping-start" TypeIncidentAge = "incident-age" TypeMute = "mute" TypeState = "state" TypeUnmute = "unmute" )
Please keep the following types in alphabetically order and, even more important, make sure that the database type event_type reflects the same values.
Variables ¶
var ErrSuperfluousMuteUnmuteEvent = errors.New("ignoring superfluous (un)mute event")
ErrSuperfluousMuteUnmuteEvent indicates that a superfluous mute or unmute event is being ignored and is triggered when trying to mute/unmute an already muted/unmuted incident.
var ErrSuperfluousStateChange = errors.New("ignoring superfluous state change")
ErrSuperfluousStateChange indicates a superfluous state change being ignored and stopping further processing.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Time time.Time `json:"-"` SourceId int64 `json:"-"` Name string `json:"name"` URL string `json:"url"` Tags map[string]string `json:"tags"` ExtraTags map[string]string `json:"extra_tags"` Type string `json:"type"` Severity Severity `json:"severity"` Username string `json:"username"` Message string `json:"message"` Mute types.Bool `json:"mute"` MuteReason string `json:"mute_reason"` ID int64 `json:"-"` }
Event received of a specified Type for internal processing.
The JSON struct tags are being used to unmarshal a JSON representation received from the listener.Listener. Some fields are being omitted as they are only allowed to be populated from within icinga-notifications. Currently, there is no Event being marshalled into its JSON representation.
func (*Event) FullString ¶
type EventRow ¶
type EventRow struct { ID int64 `db:"id"` Time types.UnixMilli `db:"time"` ObjectID types.Binary `db:"object_id"` Type types.String `db:"type"` Severity Severity `db:"severity"` Username types.String `db:"username"` Message types.String `db:"message"` Mute types.Bool `db:"mute"` MuteReason types.String `db:"mute_reason"` }
EventRow represents a single event database row and isn't an in-memory representation of an event.
type Severity ¶
type Severity int