db

package
v0.0.0-...-a9119a5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *sql.DB
View Source
var DBRO *sql.DB

Functions

func Init

func Init()

func QueryBuiltinMetrics

func QueryBuiltinMetrics(tids string) ([]*model.BuiltinMetric, error)

func QueryDynamicConfig

func QueryDynamicConfig() (map[string][]*model.DynamicConfig, error)

func QueryExpressions

func QueryExpressions() (ret []*model.Expression, err error)

func QueryGroupTemplates

func QueryGroupTemplates() (map[int][]int, error)

func QueryHostGroups

func QueryHostGroups() (map[int][]int, error)

func QueryHostMaintain

func QueryHostMaintain(hostname string) bool

func QueryHostSpecialMetric

func QueryHostSpecialMetric(hostname string) (sps []*model.BuiltinMetric)

func QueryHostTemplateIds

func QueryHostTemplateIds() (map[int][]int, error)

func QueryHosts

func QueryHosts() (map[string]int, error)

func QueryMonitoredHosts

func QueryMonitoredHosts() (map[int]*model.Host, error)

func QueryPlugins

func QueryPlugins() (map[int][]string, error)

func QueryPluginsForEnd

func QueryPluginsForEnd(hostname string) (ps []string)

func QueryServices

func QueryServices() (map[string]string, error)

func QueryStrategies

func QueryStrategies(tpls map[int]*model.Template) (map[int]*model.Strategy, map[int][]*model.Strategy, error)

func QueryStrategiesForOneEnd

func QueryStrategiesForOneEnd(endpoint string) (ss []*model.Strategy)

func QueryTemplates

func QueryTemplates() (map[int]*model.Template, error)

func QueryUnionStrategiesByUnionId

func QueryUnionStrategiesByUnionId(unionId int) (ss []*model.Strategy)

func RemoveIndex

func RemoveIndex(s []int, index int) []int

func SlaveInit

func SlaveInit()

func SliceDiffMap

func SliceDiffMap(all []int) map[int][]int

func UpdateAgent

func UpdateAgent(agentInfo *model.AgentUpdateInfo)

func UpdateAgentNew

func UpdateAgentNew(agentInfo *model.AgentUpdateInfo)

Types

This section is empty.

Jump to

Keyboard shortcuts

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