snmp

package
v0.56.4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartConfig

type ChartConfig struct {
	ID         string            `yaml:"id"`
	Title      string            `yaml:"title"`
	Units      string            `yaml:"units"`
	Family     string            `yaml:"family"`
	Type       string            `yaml:"type"`
	Priority   int               `yaml:"priority"`
	IndexRange []int             `yaml:"multiply_range"`
	Dimensions []DimensionConfig `yaml:"dimensions"`
}

type Config

type Config struct {
	UpdateEvery int           `yaml:"update_every"`
	Hostname    string        `yaml:"hostname"`
	Community   string        `yaml:"community"`
	User        User          `yaml:"user"`
	Options     Options       `yaml:"options"`
	ChartsInput []ChartConfig `yaml:"charts"`
}

type DimensionConfig

type DimensionConfig struct {
	OID        string `yaml:"oid"`
	Name       string `yaml:"name"`
	Algorithm  string `yaml:"algorithm"`
	Multiplier int    `yaml:"multiplier"`
	Divisor    int    `yaml:"divisor"`
}

type Options

type Options struct {
	Port    int    `yaml:"port"`
	Retries int    `yaml:"retries"`
	Timeout int    `yaml:"timeout"`
	Version string `yaml:"version"`
	MaxOIDs int    `yaml:"max_request_size"`
}

type SNMP

type SNMP struct {
	module.Base
	Config `yaml:",inline"`
	// contains filtered or unexported fields
}

func New

func New() *SNMP

func (*SNMP) Charts

func (s *SNMP) Charts() *module.Charts

func (*SNMP) Check

func (s *SNMP) Check() bool

func (*SNMP) Cleanup

func (s *SNMP) Cleanup()

func (*SNMP) Collect

func (s *SNMP) Collect() map[string]int64

func (*SNMP) Init

func (s *SNMP) Init() bool

type User

type User struct {
	Name          string `yaml:"name"`
	SecurityLevel string `yaml:"level"`
	AuthProto     string `yaml:"auth_proto"`
	AuthKey       string `yaml:"auth_key"`
	PrivProto     string `yaml:"priv_proto"`
	PrivKey       string `yaml:"priv_key"`
}

Jump to

Keyboard shortcuts

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