process_exporter

package
v0.24.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package process_exporter embeds https://github.com/ncabatoff/process-exporter

Package process_exporter embeds https://github.com/ncabatoff/process-exporter

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	ProcFSPath: "/proc",
	Children:   true,
	Threads:    true,
	SMaps:      true,
	Recheck:    false,
}

DefaultConfig holds the default settings for the process_exporter integration.

Functions

This section is empty.

Types

type Config

type Config struct {
	ProcessExporter exporter_config.MatcherRules `yaml:"process_names,omitempty"`

	ProcFSPath string `yaml:"procfs_path,omitempty"`
	Children   bool   `yaml:"track_children,omitempty"`
	Threads    bool   `yaml:"track_threads,omitempty"`
	SMaps      bool   `yaml:"gather_smaps,omitempty"`
	Recheck    bool   `yaml:"recheck_on_scrape,omitempty"`
}

Config controls the process_exporter integration.

func (*Config) InstanceKey added in v0.21.0

func (c *Config) InstanceKey(agentKey string) (string, error)

InstanceKey returns the hostname of the machine.

func (*Config) Name added in v0.10.0

func (c *Config) Name() string

Name returns the name of the integration that this config represents.

func (*Config) NewIntegration added in v0.10.0

func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)

NewIntegration converts this config into an instance of an integration.

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(v interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler.

type Integration

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

Integration is the process_exporter integration. The integration scrapes metrics based on information in the /proc filesystem for Linux. Agent's own metrics.

func New

func New(logger log.Logger, c *Config) (*Integration, error)

New creaets a new instance of the process_exporter integration.

func (*Integration) MetricsHandler added in v0.14.0

func (i *Integration) MetricsHandler() (http.Handler, error)

MetricsHandler satisfies Integration.RegisterRoutes.

func (*Integration) Run

func (i *Integration) Run(ctx context.Context) error

Run satisfies Integration.Run.

func (*Integration) ScrapeConfigs

func (i *Integration) ScrapeConfigs() []config.ScrapeConfig

ScrapeConfigs satisfies Integration.ScrapeConfigs.

Jump to

Keyboard shortcuts

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