blackbox_exporter

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{

	ProbeTimeoutOffset: 0.5,
}

DefaultConfig holds the default settings for the blackbox_exporter integration.

Functions

func LoadBlackboxConfig

func LoadBlackboxConfig(log log.Logger, configFile string, targets []BlackboxTarget, modules *blackbox_config.Config) (*blackbox_config.Config, error)

LoadBlackboxConfig loads the blackbox config from the given file or from embedded yaml block it also validates that targets are properly defined

func New

New creates a new blackbox_exporter integration

Types

type BlackboxTarget

type BlackboxTarget struct {
	Name   string `yaml:"name"`
	Target string `yaml:"address"`
	Module string `yaml:"module"`
}

BlackboxTarget defines a target device to be used by the integration.

type Config

type Config struct {
	BlackboxConfigFile string                 `yaml:"config_file,omitempty"`
	BlackboxTargets    []BlackboxTarget       `yaml:"blackbox_targets"`
	BlackboxConfig     blackbox_config.Config `yaml:"blackbox_config,omitempty"`
	ProbeTimeoutOffset float64                `yaml:"probe_timeout_offset,omitempty"`
}

Config configures the Blackbox integration.

func (*Config) InstanceKey

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

InstanceKey returns the hostname:port of the agent.

func (*Config) Name

func (c *Config) Name() string

Name returns the name of the integration.

func (*Config) NewIntegration

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

NewIntegration creates a new blackbox integration.

func (*Config) UnmarshalYAML

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

UnmarshalYAML implements yaml.Unmarshaler for Config.

type Integration

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

Integration is the blackbox integration. The integration scrapes metrics probing of endpoints over HTTP, HTTPS, DNS, TCP, ICMP and gRPC.

func (*Integration) MetricsHandler

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

MetricsHandler implements Integration.

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