workCenter

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COUNTER_TYPE  = "GAUGE"
	HOSTNAME_FILE = "/allconf/hostname.conf"
)

[{"counterType": "GAUGE","step": 60,"value":0,"metric": "gslb_center_data","endpoint": "hostname", "tags":"user=ping", "fields":"size=","timestamp":1473327905}]

Variables

This section is empty.

Functions

func DisposeMetricMonitorInfo

func DisposeMetricMonitorInfo(metric, endpoint, tags, fileds []string, timestamp int64)

func DisposeMonitorInfo

func DisposeMonitorInfo(endpoint, tags, fileds []string, timestamp int64)

func SetDefaultMetric

func SetDefaultMetric(metric string)

func SetDefaultReportApi

func SetDefaultReportApi(url string)

Types

type AlarmHeader

type AlarmHeader struct {
	CounterType string `json:"counterType"`
	Step        int    `json:"step"`
	Value       int    `json:"value"`
	Metric      string `json:"metric"`
	EndPoint    string `json:"endpoint"`
	Tags        string `json:"tags"`
	Fields      string `json:"fields"`
	Timestamp   int64  `json:"timestamp"` // 当前秒数
}

type AlarmInfos

type AlarmInfos []*AlarmHeader

type ReportHeader

type ReportHeader struct {
	Metric    string `json:"metric"`
	Tags      string `json:"tags"`
	Fields    string `json:"fields"`
	EndPoint  string `json:"endpoint"`
	Timestamp int64  `json:"timestamp"`
}

type ReportInfo

type ReportInfo struct {
	Data []*ReportHeader `json:"data"`
}

func DecodeReport

func DecodeReport(data []byte) (*ReportInfo, error)

Jump to

Keyboard shortcuts

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