process

package
v0.0.0-...-68d2f45 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterExporter

func RegisterExporter(
	_ context.Context,
	reg *registry.Registry,
	psLister interface{},
	dynamicDiscovery *discovery.DynamicDiscovery,
	metricsIgnore, serviceIgnore discovery.IgnoredService,
)

RegisterExporter will create a new prometheus exporter using the specified parameters and adds it to the registry.

Types

type Exporter

type Exporter struct {
	ProcessQuerier processorQuerier
	Source         proc.Source
	// contains filtered or unexported fields
}

Exporter is a Prometheus exporter to export processes metrics. It based on github.com/ncabatoff/process-exporter.

func (*Exporter) Collect

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

Collect implement Collect of a Prometheus collector.

func (*Exporter) Describe

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

Describe implement Describe of a Prometheus collector.

type StatusSource

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

StatusSource collects process status metrics.

func NewStatusSource

func NewStatusSource(ps processProvider) StatusSource

NewStatusSource initializes a StatusSource.

func (StatusSource) CollectWithState

func (s StatusSource) CollectWithState(ctx context.Context, state registry.GatherState, app storage.Appender) error

CollectWithState sends process metrics to the Appender.

Jump to

Keyboard shortcuts

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