Documentation ¶
Index ¶
- Constants
- Variables
- func GetAndRefreshNeedPingAgentForRpc(agentId int, checkedTime time.Time) (result *commonModel.NqmAgent, err error)
- func GetTargetsByAgentForRpc(agentId int) (targets []commonModel.NqmTarget, err error)
- func Init()
- func QueryBuiltinMetrics(tids string) ([]*model.BuiltinMetric, error)
- func QueryExpressions() (ret []*model.Expression, err error)
- func QueryGroupTemplates() (map[int][]int, error)
- func QueryHostGroups() (map[int][]int, error)
- func QueryHostTemplateIds() (map[int][]int, error)
- func QueryHosts() (map[string]int, error)
- func QueryMonitoredHosts() (map[int]*model.Host, error)
- func QueryPlugins() (map[int][]string, error)
- func QueryStrategies(tpls map[int]*model.Template) (map[int]*model.Strategy, error)
- func QueryTemplates() (map[int]*model.Template, error)
- func RefreshAgentInfo(agent *model.NqmAgent) (err error)
- func UpdateAgent(agentInfo *model.AgentUpdateInfo)
Constants ¶
View Source
const ( NO_PING_TASK = 0 HAS_PING_TASK_WITH_FILTER = 1 HAS_PING_TASK_ALL_MATCHING = 2 )
Variables ¶
View Source
var DB *sql.DB
Functions ¶
func GetAndRefreshNeedPingAgentForRpc ¶
func GetAndRefreshNeedPingAgentForRpc(agentId int, checkedTime time.Time) (result *commonModel.NqmAgent, err error)
Gets the data of agent for RPC
If there is no need to perform ping task, this method would return nil as result.
Reasons for not doing ping task: 1) No ping task configuration 2) The period is overed yet
func GetTargetsByAgentForRpc ¶
func GetTargetsByAgentForRpc(agentId int) (targets []commonModel.NqmTarget, err error)
Gets the targets(to be probed) for RPC
func QueryBuiltinMetrics ¶
func QueryBuiltinMetrics(tids string) ([]*model.BuiltinMetric, error)
func QueryExpressions ¶
func QueryExpressions() (ret []*model.Expression, err error)
func QueryGroupTemplates ¶
func QueryHostGroups ¶
func QueryHosts ¶
func QueryPlugins ¶
func QueryStrategies ¶
获取所有的Strategy列表
func RefreshAgentInfo ¶
Inserts a new agent or updates existing one
func UpdateAgent ¶
func UpdateAgent(agentInfo *model.AgentUpdateInfo)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.