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.
Click to show internal directories.
Click to hide internal directories.