Skip to main content
CommunityCloudEnterprise

SNMP Discovery

The SNMP discovery backend leverages SNMP (Simple Network Management Protocol) to connect to network devices and collect network information.

Diode Entities

The SNMP discovery backend uses Diode Python SDK to ingest the following entities:

Configuration

The snmp_discovery backend does not require any special configuration in the backends section. The backend will use the diode settings specified in the common subsection to forward discovery results.

orb:
backends:
common:
diode:
target: grpc://127.0.0.1:8080/diode
client_id: ${DIODE_CLIENT_ID}
client_secret: ${DIODE_CLIENT_SECRET}
agent_name: agent01
snmp_discovery:

Policy

SNMP discovery policies are broken down into two subsections: config and scope.

Configuration Parameters

Config Section

ParameterTypeRequiredDescription
schedulecron formatnoCron expression for scheduling (e.g., "*/5 * * * *")
timeoutintegernoTimeout for whole policy in seconds (defaults to 120)
snmp_timeoutintegernoTimeout for SNMP operations in seconds for SNMP operations (defaults to 5)
retriesintegernoNumber of retries for SNMP operations (defaults to 0)
lookup_extensions_dirstringnoDirectory containing device model lookup files
defaultsmapnoDefault values for entities (description, comments, tags, etc.)

Defaults Parameters

ParameterTypeRequiredDescription
tagslistnoList of tags to apply to all discovered entities
sitestringnoDefault site name for discovered devices
locationstringnoDefault location for discovered devices
rolestringnoDefault role for discovered devices
ip_addressmapnoDefault values for discovered IP addresses
interfacemapnoDefault values for discovered interfaces
devicemapnoDefault values for discovered devices

IP Address Defaults Parameters

ParameterTypeRequiredDescription
descriptionstringnoDescription for discovered IP addresses
rolestringnoRole for discovered IP addresses (e.g. "management")
tenantstringnoTenant name for discovered IP addresses
vrfstringnoVRF name for discovered IP addresses

Interface Defaults Parameters

ParameterTypeRequiredDescription
descriptionstringnoDescription for discovered interfaces
if_typestringnoInterface type (e.g. "ethernet", "virtual")

Device Defaults Parameters

ParameterTypeRequiredDescription
descriptionstringnoDescription for discovered devices
commentsstringnoComments for discovered devices

Scope Section

ParameterTypeRequiredDescription
targetslistyesList of SNMP targets to discover
authenticationmapyesSNMP authentication settings

Authentication Parameters

ParameterTypeRequiredDescription
protocol_versionstringyesSNMP protocol version ("SNMPv1", "SNMPv2c", or "SNMPv3")
communitystringyes*SNMP community string for v1/v2c authentication
usernamestringnoSNMPv3 username
security_levelstringnoSNMPv3 security level ("NoAuthNoPriv", "AuthNoPriv", "AuthPriv")
auth_protocolstringnoSNMPv3 authentication protocol ("SHA", "MD5")
auth_passphrasestringnoSNMPv3 authentication passphrase
priv_protocolstringnoSNMPv3 privacy protocol ("AES", "DES")
priv_passphrasestringnoSNMPv3 privacy passphrase

*Required for SNMPv1/v2c, optional for SNMPv3

Sample

A sample policy including all parameters supported by the SNMP discovery backend.

config:
schedule: "0 */6 * * *" # Cron expression - every 6 hours
timeout: 300 # Timeout for policy in seconds (default 2 minutes)
snmp_timeout: 10 # Timeout for SNMP operations in seconds (default 5 seconds)
retries: 3 # Number of retries
defaults:
tags: ["snmp-discovery", "orb"]
site: "datacenter-01"
location: "rack-42"
role: "network"
ip_address:
description: "SNMP discovered IP"
role: "management"
tenant: "network-ops"
vrf: "management"
interface:
description: "Auto-discovered interface"
if_type: "ethernet"
device:
description: "SNMP discovered device"
comments: "Automatically discovered via SNMP"
lookup_extensions_dir: "/opt/orb/snmp-extensions" # Specifies a directory containing device data yaml files (see below)
scope:
targets:
- host: "192.168.1.1"
- host: "192.168.1.254"
- host: "10.0.0.1"
port: 162 # Non-standard SNMP port
authentication:
protocol_version: "SNMPv2c"
community: "public"