exporter

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	///dryRun Mode, just drop data
	Sink_Mode_DryRun = -1
	///only enable export, disable sink, default mode
	Sink_Mode_None = 0
	///enable sink and export
	Sink_Mode_Include_Export = 1
	///only enable sink, disable export
	Sink_Mode_Exclude_Export = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

Exporter is a ebpf_exporter instance implementing prometheus.Collector

func New

func New(nodeID string, config config.Config) *Exporter

New creates a new exporter with the provided config

func (*Exporter) Attach

func (e *Exporter) Attach() error

Attach injects eBPF into kernel and attaches necessary kprobes

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect satisfies prometheus.Collector interface and sends all metrics

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe satisfies prometheus.Collector interface by sending descriptions for all metrics the exporter can possibly report

func (*Exporter) TablesHandler

func (e *Exporter) TablesHandler(w http.ResponseWriter, r *http.Request)

TablesHandler is a debug handler to print raw values of kernel maps

Jump to

Keyboard shortcuts

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