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: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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