Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 ¶
func New(log log.Logger, c *Config) (integrations.Integration, error)
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 util.RawYAML `yaml:"blackbox_config,omitempty"` ProbeTimeoutOffset float64 `yaml:"probe_timeout_offset,omitempty"` }
Config configures the Blackbox integration.
func (*Config) InstanceKey ¶
InstanceKey returns the hostname:port of the agent.
func (*Config) NewIntegration ¶
func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)
NewIntegration creates a new blackbox integration.
func (*Config) UnmarshalYAML ¶
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.