liuhaijun 3f5f28d785 add sheduling agent
Change-Id: I89f35fb3984044c57f10727432755012542f9fd8
2023-11-16 10:55:57 +00:00

31 lines
1.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package component
import "time"
// 组件详情
type Component struct {
COMName string `json:"comName"` // 组件名称枚举Telegraf、ProcessExporter
COMPort int64 `json:"comPort"` // 组件端口
COMType string `json:"comType"` // 组件类型,中文描述既可
COMVersion string `json:"comVersion"` // 组件版本
Config Config `json:"config"` // 组件配置(传json字符串),每个组件的信息不同
LastStarttime time.Time `json:"lastStarttime"` // 最近运行时间, 2023-08-16 00:00:00
Status string `json:"status"` // 组件状态0:离线1:在线2:故障
}
// Config 组件配置(传json字符串),每个组件的信息不同
//
// # Telegraf配置
//
// ProcessExporter配置
type Config struct {
Metrics []string `json:"metrics,omitempty"`
MetricServer []MetricServer `json:"metricServer,omitempty"` // 指标服务器名称
Tags map[string]string `json:"tags,omitempty"` // 标签map[string]string类型
}
type MetricServer struct {
Address string `json:"address"` // 指标服务器地址
Name string `json:"name"` // 指标服务器名称
}