alertfilter

package
v0.0.0-...-b03fc3e Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DevStatsDB map[string]map[string]map[string]map[string][]*AlertStat
)

Functions

func ApplyProductRules

func ApplyProductRules(al alert.Data, DevID string, ProductRules map[string]map[string]map[string][]*AlertStat)

func GetDevIDFromMeasurement

func GetDevIDFromMeasurement(name string) string

GetDevIDFromMeasurement get the deviceID from each measurmenet

func ProcessAlert

func ProcessAlert(al alert.Data)

ProcessAlert From Kapacitors

func ReloadStats

func ReloadStats() error

func SetConfDir

func SetConfDir(dir string)

SetConfDir enable load File Filters from anywhere in the our FS.

func SetDB

func SetDB(db *config.DatabaseCfg)

SetDB load database config to load data if needed (used in filters)

func SetLogger

func SetLogger(l *logrus.Logger)

SetLogger set output log

Types

type AlertStat

type AlertStat struct {
	ID             int64
	OrderID        int64
	Active         bool
	ExceptionID    int64
	FilterTagKey   string
	FilterTagValue string
}

AlertStat kk

Jump to

Keyboard shortcuts

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