Documentation
¶
Index ¶
Constants ¶
View Source
const ( // HistogramBucketExp2 means histograms with power-of-two keys HistogramBucketExp2 = "exp2" // HistogramBucketLinear means histogram with linear keys HistogramBucketLinear = "linear" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Programs []Program `yaml:"programs"`
}
Config defines exporter configuration
type Counter ¶
type Counter struct {
Name string `yaml:"name"`
Help string `yaml:"help"`
Table string `yaml:"table"`
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"`
}
Decoder defines how to decode value
type Histogram ¶
type Histogram struct {
Name string `yaml:"name"`
Help string `yaml:"help"`
Table string `yaml:"table"`
BucketType HistogramBucketType `yaml:"bucket_type"`
BucketMultiplier float64 `yaml:"bucket_multiplier"`
BucketMin int `yaml:"bucket_min"`
BucketMax int `yaml:"bucket_max"`
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
type Label ¶
type Label struct {
Name string `yaml:"name"`
Size uint `yaml:"size"`
Decoders []Decoder `yaml:"decoders"`
}
Label defines how to decode an element from eBPF table 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
type PerfEvent ¶
type PerfEvent struct {
Type int `yaml:"string"`
Name int `yaml:"name"`
Target string `yaml:"target"`
SamplePeriod int `yaml:"sample_period"`
SampleFrequency int `yaml:"sample_frequency"`
}
PerfEvent describes perf_event to attach to
type Program ¶
type Program struct {
Name string `yaml:"name"`
Metrics Metrics `yaml:"metrics"`
Kprobes map[string]string `yaml:"kprobes"`
Kretprobes map[string]string `yaml:"kretprobes"`
Tracepoints map[string]string `yaml:"tracepoints"`
RawTracepoints map[string]string `yaml:"raw_tracepoints"`
PerfEvents []PerfEvent `yaml:"perf_events"`
Code string `yaml:"code"`
Cflags []string `yaml:"cflags"`
}
Program is an eBPF program with optional metrics attached to it
Click to show internal directories.
Click to hide internal directories.