snmp

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NameToOid = make(map[string]string)

Functions

This section is empty.

Types

type Data

type Data struct {
	Name string
	// OID (could be numbers or name)
	Oid string
	// Unit
	Unit string
	//  SNMP getbulk max repetition
	MaxRepetition uint8 `toml:"max_repetition"`
	// SNMP Instance (default 0)
	// (only used with  GET request and if
	//  OID is a name from snmptranslate file)
	Instance string
	// contains filtered or unexported fields
}

type Host

type Host struct {
	Address   string
	Community string
	// SNMP version. Default 2
	Version int
	// SNMP timeout, in seconds. 0 means no timeout
	Timeout float64
	// SNMP retries
	Retries int
	// Data to collect (list of Data names)
	Collect []string
	// easy get oids
	GetOids []string
	// contains filtered or unexported fields
}

func (*Host) GetSNMPClient

func (h *Host) GetSNMPClient() (*gosnmp.GoSNMP, error)

func (*Host) HandleResponse

func (h *Host) HandleResponse(oids map[string]Data, result *gosnmp.SnmpPacket, acc inputs.Accumulator) (string, error)

func (*Host) SNMPBulk

func (h *Host) SNMPBulk(acc inputs.Accumulator) error

func (*Host) SNMPGet

func (h *Host) SNMPGet(acc inputs.Accumulator) error

type Node

type Node struct {
	// contains filtered or unexported fields
}

type Snmp

type Snmp struct {
	Host              []Host
	Get               []Data
	Bulk              []Data
	SnmptranslateFile string
}

Snmp is a snmp plugin

func (*Snmp) Description

func (s *Snmp) Description() string

Description returns description of Zookeeper plugin

func (*Snmp) Gather

func (s *Snmp) Gather(acc inputs.Accumulator) error

func (*Snmp) SampleConfig

func (s *Snmp) SampleConfig() string

SampleConfig returns sample configuration message

Jump to

Keyboard shortcuts

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