snmpfetcher

package module
v0.0.0-...-f252f9e Latest Latest
Warning

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

Go to latest
Published: May 2, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

README

snmpfetcher

Simple SNMP fetcher library

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchSimpleDataSNMP2c

func FetchSimpleDataSNMP2c(host string, port uint16, community string) (map[string]SNMPDatum, error)

FetchSimpleDataSNMP2c fetches data from an SNMP tartget using v2 udp statistics The collected data includes Linux SNMP subtrees. If any of the predefined trees is not able to be collected the function will return failure. On success an object (that should be considered opaque) is returned.

func GetIfaceData

func GetIfaceData(hostData map[string]SNMPDatum) (map[string]map[string]uint64, error)

GetIfaceData transnforms opaque data struct returned by the fetcher functions and transforms them into inteface data.

Types

type SNMPDatum

type SNMPDatum struct {
	Type  gosnmp.Asn1BER
	Value interface{}
}

Jump to

Keyboard shortcuts

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