Documentation ¶
Index ¶
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetMetrics() []*Metric
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Config) XXX_Merge(src proto.Message)
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type Kind
- type Metric
- func (*Metric) Descriptor() ([]byte, []int)
- func (m *Metric) GetDesc() string
- func (m *Metric) GetFields() []string
- func (m *Metric) GetKind() Kind
- func (m *Metric) GetMetric() string
- func (m *Metric) GetRules() []*Rule
- func (m *Metric) GetUnits() Unit
- func (*Metric) ProtoMessage()
- func (m *Metric) Reset()
- func (m *Metric) String() string
- func (m *Metric) XXX_DiscardUnknown()
- func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Metric) XXX_Merge(src proto.Message)
- func (m *Metric) XXX_Size() int
- func (m *Metric) XXX_Unmarshal(b []byte) error
- type Rule
- func (*Rule) Descriptor() ([]byte, []int)
- func (m *Rule) GetFields() map[string]string
- func (m *Rule) GetPattern() string
- func (*Rule) ProtoMessage()
- func (m *Rule) Reset()
- func (m *Rule) String() string
- func (m *Rule) XXX_DiscardUnknown()
- func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Rule) XXX_Merge(src proto.Message)
- func (m *Rule) XXX_Size() int
- func (m *Rule) XXX_Unmarshal(b []byte) error
- type Unit
Constants ¶
This section is empty.
Variables ¶
View Source
var Kind_name = map[int32]string{
0: "KIND_UNSPECIFIED",
1: "GAUGE",
2: "COUNTER",
3: "CUMULATIVE_DISTRIBUTION",
}
View Source
var Kind_value = map[string]int32{
"KIND_UNSPECIFIED": 0,
"GAUGE": 1,
"COUNTER": 2,
"CUMULATIVE_DISTRIBUTION": 3,
}
View Source
var Unit_name = map[int32]string{
0: "UNIT_UNSPECIFIED",
1: "MILLISECONDS",
2: "BYTES",
}
View Source
var Unit_value = map[string]int32{
"UNIT_UNSPECIFIED": 0,
"MILLISECONDS": 1,
"BYTES": 2,
}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // A collection of tsmon metrics and rules for how to extract them from statsd // metrics. Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Config) Descriptor ¶
func (*Config) GetMetrics ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) XXX_DiscardUnknown ¶
func (m *Config) XXX_DiscardUnknown()
func (*Config) XXX_Marshal ¶
func (*Config) XXX_Unmarshal ¶
type Metric ¶
type Metric struct { // Name of the tsmon metric to produce, required. Metric string `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"` // A kind of the metric, required. Kind Kind `protobuf:"varint,2,opt,name=kind,proto3,enum=statsd_to_tsmon.config.Kind" json:"kind,omitempty"` // Metric description. Optional, but recommended. Desc string `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"` // Units of the metric value. Optional, but recommended. Units Unit `protobuf:"varint,4,opt,name=units,proto3,enum=statsd_to_tsmon.config.Unit" json:"units,omitempty"` // A set of fields of this metric. Fields []string `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty"` // A list of rules that map statds metrics to fields of this metric. // // Each rule is represented by a statsd metric name pattern (that looks like // e.g. "something.*.${var}.*.sfx") and a recipe of how to get tsmon field // name of metrics matching the pattern. // // In the current implementation the last component of each pattern must be // some static string (i.e. not `*` and not a var) and all such suffixes must // be unique across the entire configuration file. Rules []*Rule `protobuf:"bytes,6,rep,name=rules,proto3" json:"rules,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Metric) Descriptor ¶
func (*Metric) ProtoMessage ¶
func (*Metric) ProtoMessage()
func (*Metric) XXX_DiscardUnknown ¶
func (m *Metric) XXX_DiscardUnknown()
func (*Metric) XXX_Marshal ¶
func (*Metric) XXX_Unmarshal ¶
type Rule ¶
type Rule struct { // A pattern to match statsd metric name against. // // Also used to "extract" interesting portions of the metric name to use them // in `fields`. // // For example, if the pattern is "something.*.${var}.*.sfx", statds metric // "something.foo.val.bar.sfx" matches it, and `var` value is set to "val". Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` // A map "field name => its value". // // The set of field names should be equal to the set of fields specified // in the metric definition. // // Each field value is either a static string ("foo"), or a reference to // some variable ("${var}") parsed from the statsd metric name according to // the pattern. Fields map[string]string `` /* 153-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Rule) Descriptor ¶
func (*Rule) GetPattern ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) XXX_DiscardUnknown ¶
func (m *Rule) XXX_DiscardUnknown()
func (*Rule) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.