snmp

package
v0.34.3 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 8 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      `river:"config_file,attr"`
	Targets    TargetBlock `river:"target,block"`
	WalkParams WalkParams  `river:"walk_param,block,optional"`
}

func (*Arguments) Convert

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

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

func (*Arguments) UnmarshalRiver

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

UnmarshalRiver implements River unmarshalling for Arguments.

type Auth

type Auth struct {
	Community     rivertypes.Secret `river:"community,attr,optional"`
	SecurityLevel string            `river:"security_level,attr,optional"`
	Username      string            `river:"username,attr,optional"`
	Password      rivertypes.Secret `river:"password,attr,optional"`
	AuthProtocol  string            `river:"auth_protocol,attr,optional"`
	PrivProtocol  string            `river:"priv_protocol,attr,optional"`
	PrivPassword  rivertypes.Secret `river:"priv_password,attr,optional"`
	ContextName   string            `river:"context_name,attr,optional"`
}

func (Auth) Convert

func (a Auth) Convert() snmp_config.Auth

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

type SNMPTarget

type SNMPTarget struct {
	Name       string `river:",label"`
	Target     string `river:"address,attr"`
	Module     string `river:"module,attr,optional"`
	WalkParams string `river:"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        `river:",label"`
	Version                 int           `river:"version,attr,optional"`
	MaxRepetitions          uint32        `river:"max_repetitions,attr,optional"`
	Retries                 int           `river:"retries,attr,optional"`
	Timeout                 time.Duration `river:"timeout,attr,optional"`
	Auth                    Auth          `river:"auth,block,optional"`
	UseUnconnectedUDPSocket bool          `river:"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