Versions in this module Expand all Collapse all v0 v0.6.0 Mar 27, 2023 Changes in this version + func AllMonitorLabelsForSubprobes(tx *db.Tx, subprobes []*Subprobe) (map[db.MonitorID][]*MonitorLabel, error) + func DeleteSubprobe(tx *db.Tx, subprobeId int) error + func IsLastBc(a []Breadcrumb, i int) bool + func LoadActiveSilence(db *db.DB, id db.MonitorID, subprobe string) db.SilenceID + func NewProbe(DB *db.DB, id db.MonitorID) (probe.VM, error) + func PopulateLabelsForMonitors(tx *db.Tx, monitors []*Monitor) error + type Breadcrumb struct + Link string + Text string + func LabelIndexBcs() []Breadcrumb + func LabelViewBcs(mn string, id int64) []Breadcrumb + func MonitorIndexBcs() []Breadcrumb + func MonitorViewBcs(mn string, id int64) []Breadcrumb + func SilencesIndexBcs() []Breadcrumb + func SilencesViewBcs(id int64, mn string) []Breadcrumb + func SubprobeIndexBcs(mn string, id int64) []Breadcrumb + func SubprobeViewBcs(s *Subprobe) []Breadcrumb + type Component interface + Id func() int64 + type CreatableComponent interface + IsCreate func() bool + type DeletableComponent interface + IsDelete func() bool + type Label struct + Description string + LabelID db.LabelID + Monitors []*LabelMonitor + Name string + Triggers []*LabelTrigger + func AllLabels(tx *db.Tx) ([]*Label, error) + func BlankLabel() *Label + func NewLabel(tx *db.Tx, id db.LabelID) (*Label, error) + func (*Label) ComponentName() string + func (l *Label) Id() int64 + func (l *Label) IsCreate() bool + func (l *Label) Save(tx *db.Tx) error + func (l *Label) Validate(db *db.DB) (errs []string) + type LabelMonitor struct + Create bool + Delete bool + LabelID db.LabelID + Monitor *Monitor + Subprobes string + func (lm *LabelMonitor) Id() int64 + func (lm *LabelMonitor) IsCreate() bool + func (lm *LabelMonitor) IsDelete() bool + type LabelTrigger struct + LabelID db.LabelID + Trigger *Trigger + func BlankLabelTrigger() *LabelTrigger + func (lt *LabelTrigger) Id() int64 + func (lt *LabelTrigger) IsCreate() bool + func (lt *LabelTrigger) IsDelete() bool + type Monitor struct + Archived *time.Time + Changed time.Time + Description string + Labels []*MonitorLabel + MonitorID db.MonitorID + Name string + Owner string + Probe probe.VM + ProbeParams string + ProbeType db.ProbeType + Response string + Triggers []*MonitorTrigger + Version int32 + func AllMonitors(tx *db.Tx) ([]*Monitor, error) + func AllMonitorsForLabel(tx *db.Tx, labelID db.LabelID) ([]*Monitor, error) + func BlankMonitor() (*Monitor, error) + func NewMonitor(tx *db.Tx, id db.MonitorID) (*Monitor, error) + func (*Monitor) ComponentName() string + func (m *Monitor) Id() int64 + func (m *Monitor) IsCreate() bool + func (m *Monitor) Save(tx *db.Tx) error + func (m *Monitor) Validate(DB *db.DB) (errs []string) + type MonitorLabel struct + Create bool + Delete bool + Label *Label + MonitorID db.MonitorID + Subprobes string + func (ml *MonitorLabel) Id() int64 + func (ml *MonitorLabel) IsCreate() bool + func (ml *MonitorLabel) IsDelete() bool + type MonitorTrigger struct + MonitorID db.MonitorID + Subprobes string + Trigger *Trigger + func BlankMonitorTrigger() *MonitorTrigger + func (mt *MonitorTrigger) Id() int64 + func (mt *MonitorTrigger) IsCreate() bool + func (mt *MonitorTrigger) IsDelete() bool + type NamedComponent interface + ComponentName func() string + type Reading struct + ReadingID db.ReadingID + Recorded time.Time + State state.State + StateStr string + SubprobeID db.SubprobeID + func AllReadingsFromSubprobe(DB *db.DB, id db.SubprobeID) ([]*Reading, error) + func BlankReading() *Reading + func (r *Reading) Id() int64 + type Silence struct + End time.Time + MonitorID db.MonitorID + MonitorName string + SilenceID db.SilenceID + Start time.Time + Subprobes string + func AllSilences(tx *db.Tx) ([]*Silence, error) + func BlankSilence() *Silence + func NewSilence(db *db.DB, id db.SilenceID) (*Silence, error) + func (*Silence) ComponentName() string + func (s *Silence) Editable() bool + func (s *Silence) Id() int64 + func (s *Silence) IsCreate() bool + func (s *Silence) IsPast(moment time.Time) bool + func (s *Silence) IsPresent(moment time.Time) bool + func (s *Silence) Save(tx *db.Tx) error + func (s *Silence) SetHtmlParams(values url.Values) error + func (s *Silence) Validate(db *db.DB) (errs []string) + type Subprobe struct + Archived *time.Time + MonitorID db.MonitorID + MonitorName string + Name string + Status SubprobeStatus + SubprobeID db.SubprobeID + func AllAbnormalSubprobes(tx *db.Tx) ([]*Subprobe, error) + func AllAbnormalSubprobesForLabel(tx *db.Tx, id db.LabelID) ([]*Subprobe, error) + func AllSubprobesFromMonitor(tx *db.Tx, id db.MonitorID) ([]*Subprobe, error) + func BlankSubprobe() *Subprobe + func NewSubprobe(DB *db.DB, id db.SubprobeID) (*Subprobe, error) + func (s *Subprobe) Id() int64 + type SubprobeStatus struct + EnteredState time.Time + FmtEnteredState string + LastNormal time.Time + Recorded time.Time + Silenced bool + State state.State + SubprobeID db.SubprobeID + type Trigger struct + Delete bool + Level state.State + LevelText string + Period int32 + PeriodType string + Target target.VM + TargetParams string + TargetType db.TargetType + TriggerID db.TriggerID + TriggerOnExit bool + func BlankTrigger() *Trigger + func (t *Trigger) Id() int64 v0.6.0-alpha.0 Jun 18, 2021