alarm

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ALERT_TIME_PREFIX = "/mon/alert/time/"
View Source
const ALERT_UPGRADE_PREFIX = "/mon/alert/upgrade/"
View Source
const RECOVERY_TIME_PREFIX = "/mon/recovery/time/"

Variables

This section is empty.

Functions

func CallbackConsumer

func CallbackConsumer()

func CleanEvent

func CleanEvent()

func CleanEventLoop

func CleanEventLoop()

func CleanStra

func CleanStra()

定期清理没有找到nid的策略

func CleanStraLoop

func CleanStraLoop()

func IsMaskEvent

func IsMaskEvent(event *models.Event) bool

func MergeEvent

func MergeEvent()

func NeedCallback

func NeedCallback(sid int64) bool

func PopCallbackEvent

func PopCallbackEvent(queue string) *models.Event

func PushCallbackEvent

func PushCallbackEvent(event *models.Event) error

func ReadHighEvent

func ReadHighEvent()

func ReadLowEvent

func ReadLowEvent()

func SetEventStatus

func SetEventStatus(event *models.Event, status string)

func SyncMaskconf

func SyncMaskconf() error

func SyncMaskconfLoop

func SyncMaskconfLoop()

func SyncStra

func SyncStra() error

func SyncStraLoop

func SyncStraLoop()

Types

type CallbackEvent

type CallbackEvent struct {
	Id          int64                `json:"id"`
	Sid         int64                `json:"sid"`
	Sname       string               `json:"sname"`
	NodePath    string               `json:"node_path"`
	Nid         int64                `json:"nid"`
	Endpoint    string               `json:"endpoint"`
	Priority    int                  `json:"priority"`
	EventType   string               `json:"event_type"` // alert|recovery
	Category    int                  `json:"category"`
	Status      uint16               `json:"status"`
	HashId      uint64               `json:"hashid"  xorm:"hashid"`
	Etime       int64                `json:"etime"`
	Value       string               `json:"value"`
	Info        string               `json:"info"`
	LastUpdator string               `json:"last_updator"`
	Created     time.Time            `json:"created" xorm:"created"`
	Groups      []string             `json:"groups"`
	Users       []string             `json:"users"`
	Detail      []models.EventDetail `json:"detail"`
}

Jump to

Keyboard shortcuts

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