Documentation ¶
Index ¶
- type AgentHeartbeatRequest
- type AgentPluginsResponse
- type AgentReportRequest
- type AgentUpdateInfo
- type BuiltinMetric
- type BuiltinMetricResponse
- type BuiltinMetricSlice
- type Event
- func (this *Event) ActionId() int
- func (this *Event) Counter() string
- func (this *Event) ExpressionId() int
- func (this *Event) FormattedTime() string
- func (this *Event) Func() string
- func (this *Event) MaxStep() int
- func (this *Event) Metric() string
- func (this *Event) Note() string
- func (this *Event) Operator() string
- func (this *Event) Priority() int
- func (this *Event) RightValue() float64
- func (this *Event) StrategyId() int
- func (this *Event) String() string
- func (this *Event) Tpl() *Template
- func (this *Event) TplId() int
- type Expression
- type ExpressionResponse
- type GraphAccurateQueryParam
- type GraphAccurateQueryResponse
- type GraphDeleteParam
- type GraphDeleteResp
- type GraphFullyInfo
- type GraphInfoParam
- type GraphInfoResp
- type GraphItem
- type GraphLastParam
- type GraphLastResp
- type GraphQueryParam
- type GraphQueryResponse
- type HistoryData
- type Host
- type HostStrategy
- type JsonFloat
- type JsonMetaData
- type JudgeItem
- type MetaData
- type MetricValue
- type NodataConfig
- type NodataItem
- type NullRpcRequest
- type RRDData
- type SimpleRpcResponse
- type StrategiesResponse
- type Strategy
- type Template
- type TransferResponse
- type TsdbItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentHeartbeatRequest ¶
func (*AgentHeartbeatRequest) String ¶
func (this *AgentHeartbeatRequest) String() string
type AgentPluginsResponse ¶
func (*AgentPluginsResponse) String ¶
func (this *AgentPluginsResponse) String() string
type AgentReportRequest ¶
type AgentReportRequest struct { Hostname string IP string AgentVersion string PluginVersion string }
func (*AgentReportRequest) String ¶
func (this *AgentReportRequest) String() string
type AgentUpdateInfo ¶
type AgentUpdateInfo struct { LastUpdate int64 ReportRequest *AgentReportRequest }
type BuiltinMetric ¶
e.g. net.port.listen or proc.num
func (*BuiltinMetric) String ¶
func (this *BuiltinMetric) String() string
type BuiltinMetricResponse ¶
type BuiltinMetricResponse struct { Metrics []*BuiltinMetric Checksum string Timestamp int64 }
func (*BuiltinMetricResponse) String ¶
func (this *BuiltinMetricResponse) String() string
type BuiltinMetricSlice ¶
type BuiltinMetricSlice []*BuiltinMetric
func (BuiltinMetricSlice) Len ¶
func (this BuiltinMetricSlice) Len() int
func (BuiltinMetricSlice) Less ¶
func (this BuiltinMetricSlice) Less(i, j int) bool
func (BuiltinMetricSlice) Swap ¶
func (this BuiltinMetricSlice) Swap(i, j int)
type Event ¶
type Event struct { Id string `json:"id"` Strategy *Strategy `json:"strategy"` Expression *Expression `json:"expression"` Status string `json:"status"` // OK or PROBLEM Endpoint string `json:"endpoint"` LeftValue float64 `json:"leftValue"` CurrentStep int `json:"currentStep"` EventTime int64 `json:"eventTime"` PushedTags map[string]string `json:"pushedTags"` }
机器监控和实例监控都会产生Event,共用这么一个struct
func (*Event) ExpressionId ¶
func (*Event) FormattedTime ¶
func (*Event) RightValue ¶
func (*Event) StrategyId ¶
type Expression ¶
type Expression struct { Id int `json:"id"` Metric string `json:"metric"` Tags map[string]string `json:"tags"` Func string `json:"func"` // e.g. max(#3) all(#3) Operator string `json:"operator"` // e.g. < != RightValue float64 `json:"rightValue"` // critical value MaxStep int `json:"maxStep"` Priority int `json:"priority"` Note string `json:"note"` ActionId int `json:"actionId"` }
func (*Expression) String ¶
func (this *Expression) String() string
type ExpressionResponse ¶
type ExpressionResponse struct {
Expressions []*Expression `json:"expressions"`
}
type GraphAccurateQueryParam ¶
type GraphAccurateQueryParam struct { Checksum string `json:"checksum"` Start int64 `json:"start"` End int64 `json:"end"` ConsolFun string `json:"consolFuc"` DsType string `json:"dsType"` Step int `json:"step"` }
页面上已经可以看到DsType和Step了,直接带进查询条件,Graph更易处理
type GraphAccurateQueryResponse ¶
type GraphAccurateQueryResponse struct {
Values []*RRDData `json:"values"`
}
type GraphDeleteParam ¶
type GraphDeleteResp ¶
type GraphDeleteResp struct { }
type GraphFullyInfo ¶
type GraphInfoParam ¶
type GraphInfoResp ¶
type GraphItem ¶
type GraphItem struct { Endpoint string `json:"endpoint"` Metric string `json:"metric"` Tags map[string]string `json:"tags"` Value float64 `json:"value"` Timestamp int64 `json:"timestamp"` DsType string `json:"dstype"` Step int `json:"step"` Heartbeat int `json:"heartbeat"` Min string `json:"min"` Max string `json:"max"` }
DsType 即RRD中的Datasource的类型:GAUGE|COUNTER|DERIVE
func (*GraphItem) PrimaryKey ¶
type GraphLastParam ¶
type GraphLastResp ¶
type GraphQueryParam ¶
type GraphQueryParam struct { Start int64 `json:"start"` End int64 `json:"end"` ConsolFun string `json:"consolFuc"` Endpoint string `json:"endpoint"` Counter string `json:"counter"` Step int `json:"step"` }
ConsolFun 是RRD中的概念,比如:MIN|MAX|AVERAGE
type GraphQueryResponse ¶
type HistoryData ¶
type HostStrategy ¶
type JsonMetaData ¶
type JsonMetaData struct { Metric string `json:"metric"` Endpoint string `json:"endpoint"` Timestamp int64 `json:"timestamp"` Step int64 `json:"step"` Value interface{} `json:"value"` CounterType string `json:"counterType"` Tags string `json:"tags"` }
Same As `MetricValue`
func (*JsonMetaData) String ¶
func (t *JsonMetaData) String() string
type JudgeItem ¶
type JudgeItem struct { Endpoint string `json:"endpoint"` Metric string `json:"metric"` Value float64 `json:"value"` Timestamp int64 `json:"timestamp"` JudgeType string `json:"judgeType"` Tags map[string]string `json:"tags"` }
func (*JudgeItem) PrimaryKey ¶
type MetaData ¶
type MetricValue ¶
type MetricValue struct { Endpoint string `json:"endpoint"` Metric string `json:"metric"` Value interface{} `json:"value"` Step int64 `json:"step"` Type string `json:"counterType"` Tags string `json:"tags"` Timestamp int64 `json:"timestamp"` }
func (*MetricValue) String ¶
func (this *MetricValue) String() string
type NodataConfig ¶
type NodataConfig struct { Id int `json:"id"` Name string `json:"name"` ObjType string `json:"objType"` Endpoint string `json:"endpoint"` Metric string `json:"metric"` Tags map[string]string `json:"tags"` Type string `json:"type"` Step int64 `json:"step"` Mock float64 `json:"mock"` }
func NewNodataConfig ¶
func (*NodataConfig) String ¶
func (this *NodataConfig) String() string
type NodataItem ¶
type NodataItem struct { Counter string `json:"counter"` Ts int64 `json:"ts"` FStatus string `json:"fstatus"` FTs int64 `json:"fts"` }
func (*NodataItem) String ¶
func (this *NodataItem) String() string
type NullRpcRequest ¶
type NullRpcRequest struct { }
type RRDData ¶
func NewRRDData ¶
type SimpleRpcResponse ¶
type SimpleRpcResponse struct {
Code int `json:"code"`
}
code == 0 => success code == 1 => bad request
func (*SimpleRpcResponse) String ¶
func (this *SimpleRpcResponse) String() string
type StrategiesResponse ¶
type StrategiesResponse struct {
HostStrategies []*HostStrategy `json:"hostStrategies"`
}
type Strategy ¶
type Strategy struct { Id int `json:"id"` Metric string `json:"metric"` Tags map[string]string `json:"tags"` Func string `json:"func"` // e.g. max(#3) all(#3) Operator string `json:"operator"` // e.g. < != RightValue float64 `json:"rightValue"` // critical value MaxStep int `json:"maxStep"` Priority int `json:"priority"` Note string `json:"note"` Tpl *Template `json:"tpl"` }
type Template ¶
type TransferResponse ¶
func (*TransferResponse) String ¶
func (this *TransferResponse) String() string
Click to show internal directories.
Click to hide internal directories.