db

package
Version: v0.0.0-...-7437625 Latest Latest
Warning

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

Go to latest
Published: May 18, 2017 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *sql.DB

Functions

func Init

func Init()

func QueryBuiltinMetrics

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

func QueryEndpoint

func QueryEndpoint(ip string) (string, error)

Get endpoint by ip

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 QueryHostTemplateIds

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

一个机器ID对应了多个模板ID

func QueryHosts

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

func QueryMonitoredHosts

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

func QueryPlugins

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

func QueryStrategies

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

获取所有的Strategy列表

func QueryTemplates

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

获取所有的策略模板列表

func UpdateAgent

func UpdateAgent(agentInfo *model.AgentUpdateInfo)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL