Documentation ¶
Index ¶
- Variables
- func FormatOutput(out []byte, ts int64, offsetTime time.Duration, handler tasks.TimestampHandler) (map[int64]map[string]tasks.PromEvent, error)
- func New(globalConfig define.Config, taskConfig define.TaskConfig) define.Task
- func ShellWordPreProcess(cmdline string) string
- type Event
- type Gather
Constants ¶
This section is empty.
Variables ¶
View Source
var ExecCmdLine = utils.RunString
ExecCmdLine is so tests can mock out exec.Command usage.
Functions ¶
func FormatOutput ¶
func FormatOutput(out []byte, ts int64, offsetTime time.Duration, handler tasks.TimestampHandler) (map[int64]map[string]tasks.PromEvent, error)
FormatOutput 解析 Prom 格式数据,输出结构化数据,同时输出失败记录
func ShellWordPreProcess ¶
Types ¶
type Event ¶
type Event struct { DataID int32 TaskID int32 TaskType string ErrorCode define.NamedCode BizID int32 StartAt time.Time EndAt time.Time Dimension common.MapStr Metric common.MapStr Message string Timestamp int64 LocalTime string UTCTime string UserTime string Labels []map[string]string Exemplar common.MapStr }
func (*Event) IgnoreCMDBLevel ¶
func (*Event) TaskDuration ¶
type Gather ¶
func (*Gather) KeepOneDimension ¶
KeepOneDimension 只在测试模式需要这么处理 指标名+维度字段名 作为唯一的 key 不同维度值只保留一个,但是如果有多的维度名,那么需要保留,详细可以看 test 里的案例
Click to show internal directories.
Click to hide internal directories.