Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CgroupIDMap ¶ added in v2.5.0
type CgroupIDMap struct {
Name string `yaml:"name"`
Type CgroupIDMapType `yaml:"type"`
Regexps []string `yaml:"regexps"`
}
CgroupIDMap describes the cgroup that the bpf programs are interested in. The cgroups that match the provided regexps will be available to the bpf program as a shared map with provided name.
type CgroupIDMapType ¶ added in v2.5.1
type CgroupIDMapType string
CgroupIDMapType describes the map type that stores the cgroups that the bpf programs are interested in.
const ( // CgroupIDMapHashType is normal hash map such as BPF_MAP_TYPE_LRU_HASH CgroupIDMapHashType CgroupIDMapType = "hash" // CgroupIDMapCgrpStorageType is specialized BPF_MAP_TYPE_CGRP_STORAGE map // with data keyed on a cgroup. When a group is deleted, data is automatically // removed. CgroupIDMapCgrpStorageType CgroupIDMapType = "cgrp_storage" )
type Config ¶
type Config struct {
Name string `yaml:"name"`
Metrics Metrics `yaml:"metrics"`
Tracing Tracing `yaml:"tracing"`
Kaddrs []string `yaml:"kaddrs"`
CgroupIDMap CgroupIDMap `yaml:"cgroup_id_map"`
BPFPath string
}
Config describes how to configure and extract metrics
type Counter ¶
type Counter struct {
Name string `yaml:"name"`
Help string `yaml:"help"`
PerfEventArray bool `yaml:"perf_event_array"`
FlushInterval time.Duration `yaml:"flush_interval"`
Labels []Label `yaml:"labels"`
}
Counter is a metric defining prometheus counter
type Decoder ¶
type Decoder struct {
Name string `yaml:"name"`
StaticMap map[string]string `yaml:"static_map"`
Regexps []string `yaml:"regexps"`
AllowUnknown bool `yaml:"allow_unknown"`
}
Decoder defines how to decode value
type Histogram ¶
type Histogram struct {
Name string `yaml:"name"`
Help string `yaml:"help"`
BucketType HistogramBucketType `yaml:"bucket_type"`
BucketMultiplier float64 `yaml:"bucket_multiplier"`
BucketMin int `yaml:"bucket_min"`
BucketMax int `yaml:"bucket_max"`
BucketKeys []float64 `yaml:"bucket_keys"`
Labels []Label `yaml:"labels"`
}
Histogram is a metric defining prometheus histogram
type HistogramBucketType ¶
type HistogramBucketType string
HistogramBucketType is an enum to define how to interpret histogram
const ( // HistogramBucketExp2 means histograms with power-of-two keys HistogramBucketExp2 HistogramBucketType = "exp2" // HistogramBucketExp2WithZero means histograms with power-of-two keys where the first key is for zero HistogramBucketExp2WithZero HistogramBucketType = "exp2zero" // HistogramBucketLinear means histogram with linear keys HistogramBucketLinear HistogramBucketType = "linear" // HistogramBucketFixed means histogram with fixed user-defined keys HistogramBucketFixed HistogramBucketType = "fixed" )
type Label ¶
type Label struct {
Name string `yaml:"name"`
Size uint `yaml:"size"`
Padding uint `yaml:"padding"`
Decoders []Decoder `yaml:"decoders"`
}
Label defines how to decode an element from eBPF map key with the list of decoders
type Metrics ¶
type Metrics struct {
Counters []Counter `yaml:"counters"`
Histograms []Histogram `yaml:"histograms"`
}
Metrics is a collection of metrics attached to a program