blackbox

package
v1.4.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	ProbeTimeoutOffset: 500 * time.Millisecond,
}

DefaultArguments holds non-zero default options for Arguments when it is unmarshaled from Alloy.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	ConfigFile         string                    `alloy:"config_file,attr,optional"`
	Config             alloytypes.OptionalSecret `alloy:"config,attr,optional"`
	Targets            TargetBlock               `alloy:"target,block,optional"`
	ProbeTimeoutOffset time.Duration             `alloy:"probe_timeout_offset,attr,optional"`

	// New way of passing targets. This allows the component to receive targets from other components.
	TargetsList TargetsList `alloy:"targets,attr,optional"`
}

func (*Arguments) Convert

func (a *Arguments) Convert() *blackbox_exporter.Config

Convert converts the component's Arguments to the integration's Config.

func (*Arguments) SetToDefault

func (a *Arguments) SetToDefault()

SetToDefault implements syntax.Defaulter.

func (*Arguments) Validate

func (a *Arguments) Validate() error

Validate implements syntax.Validator.

type BlackboxTarget

type BlackboxTarget struct {
	Name   string            `alloy:"name,attr"`
	Target string            `alloy:"address,attr"`
	Module string            `alloy:"module,attr,optional"`
	Labels map[string]string `alloy:"labels,attr,optional"`
}

BlackboxTarget defines a target to be used by the exporter.

type TargetBlock

type TargetBlock []BlackboxTarget

func (TargetBlock) Convert

Convert converts the component's TargetBlock to a slice of integration's BlackboxTarget.

type TargetsList added in v1.3.0

type TargetsList []map[string]string

func (TargetsList) Convert added in v1.3.0

Jump to

Keyboard shortcuts

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