Documentation ¶
Index ¶
- Variables
- func NewProbe(g *graph.Graph, community, interval string) (probe.Handler, error)
- type Client
- func (c *Client) Close()
- func (c *Client) Connect() error
- func (c *Client) Get(oid string) (result interface{}, err error)
- func (c *Client) GetMany(oids map[string]string, result Metadata) (err error)
- func (c *Client) GetNext(oid string) (nextOID string, result interface{}, err error)
- func (c *Client) GetNextMany(oids map[string]string, result Metadata) (nextOIDs map[string]string, err error)
- func (c *Client) Walk(rootOid string, walkFn gosnmp.WalkFunc) error
- type IfaceConfig
- type IfaceMetric
- type LLDPMetadata
- type Metadata
- type Probe
Constants ¶
This section is empty.
Variables ¶
var IfConfigOIDs = map[string]string{
"PhysicalAddress": ".1.3.6.1.2.1.2.2.1.6",
"State": ".1.3.6.1.2.1.2.2.1.8",
"MTU": ".1.3.6.1.2.1.2.2.1.4",
"Speed": ".1.3.6.1.2.1.2.2.1.5",
}
IfConfigOIDs store system's port configs
var IfDescrOID = "1.3.6.1.2.1.2.2.1.2"
IfDescrOID store system's port descriptions
var IfMetricOIDs = map[string]string{
"IfInOctets": ".1.3.6.1.2.1.2.2.1.10",
"IfInUcastPkts": ".1.3.6.1.2.1.2.2.1.11",
"IfInMulticastPkts": ".1.3.6.1.2.1.31.1.1.1.2",
"IfInBroadcastPkts": ".1.3.6.1.2.1.31.1.1.1.3",
"IfInDiscards": ".1.3.6.1.2.1.2.2.1.13",
"IfInErrors": ".1.3.6.1.2.1.2.2.1.14",
"IfInUnknownProtos": ".1.3.6.1.2.1.2.2.1.15",
"IfOutOctets": ".1.3.6.1.2.1.2.2.1.16",
"IfOutUcastPkts": ".1.3.6.1.2.1.2.2.1.17",
"IfOutMulticastPkts": ".1.3.6.1.2.1.31.1.1.1.4",
"IfOutBroadcastPkts": ".1.3.6.1.2.1.31.1.1.1.5",
"IfOutDiscards": ".1.3.6.1.2.1.2.2.1.19",
"IfOutErrors": ".1.3.6.1.2.1.2.2.1.20",
}
IfMetricOIDs store system's port metrics
var IfNameOID = "1.3.6.1.2.1.31.1.1.1.1"
IfNameOID store system's port names
var LldpLocalChassisOIDs = map[string]string{
"Description": ".1.0.8802.1.1.2.1.3.4.0",
"ChassisID": ".1.0.8802.1.1.2.1.3.2.0",
"ChassisIDType": ".1.0.8802.1.1.2.1.3.1.0",
"SysName": ".1.0.8802.1.1.2.1.3.3.0",
}
LldpLocalChassisOIDs store local system information
var LldpLocalPortOIDs = map[string]string{
"Description": ".1.0.8802.1.1.2.1.3.7.1.4",
"PortID": ".1.0.8802.1.1.2.1.3.7.1.3",
"PortIDType": ".1.0.8802.1.1.2.1.3.7.1.2",
}
LldpLocalPortOIDs store local port information
var LldpRemoteChassisMgmtAddressOID = ".1.0.8802.1.1.2.1.4.2.1.4"
LldpRemoteChassisMgmtAddressOID store remote management addresses
var LldpRemotePortIDOID = ".1.0.8802.1.1.2.1.4.1.1.7"
LldpRemotePortIDOID store remote system's port ids
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements a wrapper around gosnmp.GoSNMP struct to provide additional functionalities for specific use cases in this package
func NewSnmpClient ¶
NewSnmpClient create a new SNMP client
func (*Client) GetMany ¶
GetMany takes a map of oids and return the result of snmpget command in a map
type IfaceConfig ¶
type IfaceConfig map[string]interface{}
IfaceConfig is information retrived using SNMP requests on IfConfigOIDs
type IfaceMetric ¶
type IfaceMetric struct {
topology.ChassisInterfaceMetric
}
IfaceMetric are information retrieved using SNMP requests on IfMetricOIDs
func (*IfaceMetric) Set ¶
func (m *IfaceMetric) Set(k string, v interface{}) error
Set value on field
type LLDPMetadata ¶
LLDPMetadata is information retrieved using SNMP requests on LLDP OIDs
func (*LLDPMetadata) Set ¶
func (m *LLDPMetadata) Set(k string, v interface{}) error
Set value on field