metadata

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SysNameOID is the OID for SysName
	SysNameOID = "1.3.6.1.2.1.1.5.0"
	// SysDescrOID is the OID for SysDescr
	SysDescrOID = "1.3.6.1.2.1.1.1.0"
	// SysObjectIDOID is the OID for SysObjectID
	SysObjectIDOID = "1.3.6.1.2.1.1.2.0"
)

Scalar OIDs

View Source
const (
	// IfNameOID is the OID for IfName
	IfNameOID = "1.3.6.1.2.1.31.1.1.1.1"
	// IfAliasOID is the OID for IfAlias
	IfAliasOID = "1.3.6.1.2.1.31.1.1.1.18"
	// IfDescrOID is the OID for IfDescr
	IfDescrOID = "1.3.6.1.2.1.2.2.1.2"
	// IfPhysAddressOID is the OID for IfPhysAddress
	IfPhysAddressOID = "1.3.6.1.2.1.2.2.1.6"
	// IfAdminStatusOID is the OID for IfAdminStatus
	IfAdminStatusOID = "1.3.6.1.2.1.2.2.1.7"
	// IfOperStatusOID is the OID for IfOperStatus
	IfOperStatusOID = "1.3.6.1.2.1.2.2.1.8"
)
View Source
const (
	// DeviceStatusReachable means the device can be reached by snmp integration
	DeviceStatusReachable = DeviceStatus(1)
	// DeviceStatusUnreachable means the device cannot be reached by snmp integration
	DeviceStatusUnreachable = DeviceStatus(2)
)
View Source
const PayloadMetadataBatchSize = 100

PayloadMetadataBatchSize is the number of resources per event payload Resources are devices, interfaces, etc

Variables

ColumnOIDs is the list of all column OIDs needed for device metadata

ScalarOIDs is the list of all scalar OIDs needed for device metadata

Functions

This section is empty.

Types

type DeviceMetadata

type DeviceMetadata struct {
	ID          string       `json:"id"`
	IDTags      []string     `json:"id_tags"` // id_tags is the input to produce device.id, it's also used to correlated with device metrics.
	Name        string       `json:"name"`
	Description string       `json:"description"`
	IPAddress   string       `json:"ip_address"`
	SysObjectID string       `json:"sys_object_id"`
	Profile     string       `json:"profile"`
	Vendor      string       `json:"vendor"`
	Subnet      string       `json:"subnet"`
	Tags        []string     `json:"tags"`
	Status      DeviceStatus `json:"status"`
}

DeviceMetadata contains device metadata

type DeviceStatus

type DeviceStatus int32

DeviceStatus enum type

type InterfaceMetadata

type InterfaceMetadata struct {
	DeviceID    string   `json:"device_id"`
	IDTags      []string `json:"id_tags"` // used to correlate with interface metrics
	Index       int32    `json:"index"`   // IF-MIB ifIndex type is InterfaceIndex (Integer32 (1..2147483647))
	Name        string   `json:"name"`
	Alias       string   `json:"alias"`
	Description string   `json:"description"`
	MacAddress  string   `json:"mac_address"`
	AdminStatus int32    `json:"admin_status"` // IF-MIB ifAdminStatus type is INTEGER
	OperStatus  int32    `json:"oper_status"`  // IF-MIB ifOperStatus type is INTEGER
}

InterfaceMetadata contains interface metadata

type NetworkDevicesMetadata

type NetworkDevicesMetadata struct {
	Subnet           string              `json:"subnet"`
	Namespace        string              `json:"namespace"`
	Devices          []DeviceMetadata    `json:"devices,omitempty"`
	Interfaces       []InterfaceMetadata `json:"interfaces,omitempty"`
	CollectTimestamp int64               `json:"collect_timestamp"`
}

NetworkDevicesMetadata contains network devices metadata

Jump to

Keyboard shortcuts

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