snmp

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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"`
	WalkParams   WalkParams                `alloy:"walk_param,block,optional"`
	ConfigStruct snmp_config.Config
}

func (*Arguments) Convert

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

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

func (*Arguments) UnmarshalAlloy

func (a *Arguments) UnmarshalAlloy(f func(interface{}) error) error

UnmarshalAlloy implements Alloy unmarshalling for Arguments.

type SNMPTarget

type SNMPTarget struct {
	Name       string `alloy:",label"`
	Target     string `alloy:"address,attr"`
	Module     string `alloy:"module,attr,optional"`
	Auth       string `alloy:"auth,attr,optional"`
	WalkParams string `alloy:"walk_params,attr,optional"`
}

SNMPTarget defines a target to be used by the exporter.

type TargetBlock

type TargetBlock []SNMPTarget

func (TargetBlock) Convert

func (t TargetBlock) Convert() []snmp_exporter.SNMPTarget

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

type WalkParam

type WalkParam struct {
	Name                    string        `alloy:",label"`
	MaxRepetitions          uint32        `alloy:"max_repetitions,attr,optional"`
	Retries                 int           `alloy:"retries,attr,optional"`
	Timeout                 time.Duration `alloy:"timeout,attr,optional"`
	UseUnconnectedUDPSocket bool          `alloy:"use_unconnected_udp_socket,attr,optional"`
}

type WalkParams

type WalkParams []WalkParam

func (WalkParams) Convert

func (w WalkParams) Convert() map[string]snmp_config.WalkParams

Convert converts the component's WalkParams to the integration's WalkParams.

Jump to

Keyboard shortcuts

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