Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StatusUnknown is status of this alert is unknown StatusUnknown = iota //StatusFiring is the status of this alert is currently firing StatusFiring // StatusResolved is the status of this alert has been resovled StatusResolved )
View Source
const ( // QueueNew ... QueueNew = iota // QueueUpdateAdd ... QueueUpdateAdd // QueueUpdateDelete ... QueueUpdateDelete // QueueDelete ... QueueDelete )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct { Status Status // unknown|firing|resolved Name string // Name of the alert Hash string // A unique identifier for this specific alert Syscall string // the name of the syscall that triggered the alert. URL string // GeneratorURL }
Info contains specific information about an alert as it pertains to an AlertSource
type Prometheus ¶
type Prometheus struct {
Parser
}
Prometheus is our parser for prometheus-sourced alerts
func (*Prometheus) ParseAlerts ¶
func (p *Prometheus) ParseAlerts(r io.Reader) ([]*Alert, error)
ParseAlerts parses prometheus-formatted data from `r`
type Queue ¶
Queue is the abstraction around a queue of alerts.
func NewAlertQueue ¶
NewAlertQueue creates a new instance of the alert queue.
type QueueCallback ¶
QueueCallback is a function to call for any process/updates
Click to show internal directories.
Click to hide internal directories.