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 ¶
View Source
var ColumnOIDs = []string{ IfNameOID, IfAliasOID, IfDescrOID, IfPhysAddressOID, IfAdminStatusOID, IfOperStatusOID, }
ColumnOIDs is the list of all column OIDs needed for device metadata
View Source
var ScalarOIDs = []string{ SysNameOID, SysDescrOID, SysObjectIDOID, }
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 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
Click to show internal directories.
Click to hide internal directories.