Skip to content

Visibility and Monitoring

Table 1 Exporter View

CommandPurpose
show exporterDisplay exporter configuration

[Command]

show exporter

[Purpose]

Display exporter configuration

[View]

Privileged User View

[Use Cases]

sonic# show exporter
exporter cache duration:
- bgp: default
- device: default
- evpn: default
- sag: default
- mclag: default
- ntp: default
- interface: default
- roce_stats: default
exporter capture interval:
- bgp: default
- device: default
- evpn: default
- sag: default
- mclag: default
- ntp: default

Table 2 Exporter Config

CommandPurpose
exporter cache-duration {bgp|device|evpn|sag|mclag|ntp|roce_stats|interface} timeConfigure the cache duration of each module in the exporter
exporter capture-interval {bgp|device|evpn|sag|mclag|ntp} timeConfigure the capture time interval for each module of the exporter
exporter millisecond_level_monitoring enableActivate exporter millisecond data collection function

exporter cache-duration {bgp|device|evpn|sag|mclag|ntp|roce_stats|interface} time

Section titled “exporter cache-duration {bgp|device|evpn|sag|mclag|ntp|roce_stats|interface} time”

[Command]

exporter cache-duration {bgp|device|evpn|sag|mclag|ntp|roce_stats|interface} time

[Purpose]

Configure the cache duration of each module in the exporter

[Parameters]

ParameterDescription
timeCache duration, range (1-60) s

[View]

Global Configuration View

[Notes]

Run command no exporter cache-duration {bgp|device|evpn|sag|mclag|ntp|roce_stats|interface} to delete the cache duration configuration of each module and restore the default configuration. The default values for each module are as follows: bgp、evpn、sag :25-30s device、mclag、ntp:15s roce_stats、interface:1s

[Use Cases]

sonic# configure
sonic(config)# exporter cache-duration bgp 15

exporter capture-interval {bgp|device|evpn|sag|mclag|ntp} time

Section titled “exporter capture-interval {bgp|device|evpn|sag|mclag|ntp} time”

[Command]

exporter capture-interval {bgp|device|evpn|sag|mclag|ntp} time

[Purpose]

Configure the capture time interval for each module of the exporter

[Parameters]

ParameterDescription
timeCapture time interval, range (1-60) s

[View]

Global Configuration View

[Notes]

Run command no exporter capture-interval {bgp|device|evpn|sag|mclag|ntp} to delete the capture time interval configuration of each module and restore the default configuration. The default value for all modules is 30s.

[Use Cases]

sonic# configure
sonic(config)# exporter capture-interval bgp 15

exporter millisecond_level_monitoring enable

Section titled “exporter millisecond_level_monitoring enable”

[Command]

exporter millisecond_level_monitoring enable

[Purpose]

Activate exporter millisecond data collection function

[View]

Global Configuration View

[Notes]

Enable the millisecond-level data acquisition function for the interface and RoCE modules only, with an interval of 500 ms. Run command no exporter millisecond_level_monitoring to turn off the millisecond-level data collection function.

[Use Cases]

sonic# configure
sonic(config)# exporter millisecond_level_monitoring enable

Table 3 Mirror View

CommandPurpose
show mirrorDisplay mirror configuration.

[Command]

show mirror

[Purpose]

Display mirror configuration.

[View]

Privileged User View

[Use Cases]

sonic# show mirror

Table 4 Mirror Config

CommandPurpose
mirror session session-id type {span|erspan}Create a mirror session.
source interface ethernet interface_nameSpecify the source interface of the local mirror.
destination interface ethernet interface_nameSpecify the destination interface of the local mirror.
direction [in|out|both]Specify local mirror diretion
origin ip address A.B.C.DSpecify the source IP of the remote mirror tunnel.
destination ip address A.B.C.DSpecify the destination IP of the remote mirror tunnel.
ip ttl ttl_valueSpecify TTL value of the remote mirror tunnel.
ip dscp dscp_valueSpecify DSCP value of the remote mirror tunnel.
queue queue-idSpecify the queue that the remote mirror tunnel is bound to.
gre_type typeSpecify the type of the remote mirror tunnel.

mirror session session-id type {span|erspan}

Section titled “mirror session session-id type {span|erspan}”

[Command]

mirror session session-id type {span|erspan}

[Purpose]

Create a mirror session.

[Parameters]

ParameterDescription
session-idMirror session ID, the range is [1,63]

[View]

Global Configuration View

[Notes]

Span is the local mirror type. Erspan is the remote mirror type, which sends traffic to the remote side through a GRE tunnel. Run command no mirror session session-id to delete the mirror session.

[Use Cases]

sonic# configure
sonic(config)# mirror session 0 type span
sonic(config)# mirror session 1 type erspan

[Command]

source interface ethernet interface_name

[Purpose]

Specify the source interface of the local mirror.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View]

SPAN Mirror Configuration View

[Notes]

Run command no source interface ethernet interface_name to delete the source interface.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type span
sonic(config-span-mirror-10)# source interface ethernet 0/56
sonic(config-span-mirror-10)# source interface ethernet 0/4

destination interface ethernet interface_name

Section titled “destination interface ethernet interface_name”

[Command]

destination interface ethernet interface_name

[Purpose]

Specify the destination interface of the local mirror.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View]

SPAN Mirror Configuration View

[Notes]

Run command no destination to delete the destination interface.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type span
sonic(config-span-mirror-10)# no source interface ethernet 0/56

[Command]

direction [in|out|both]

[Purpose]

Specify local mirror diretion.

[View]

SPAN Mirror Configuration View

[Notes]

The default mirroring direction is both, i.e., both inbound and outbound directions are mirrored.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type span
sonic(config-span-mirror-10)# direction in

[Command]

origin ip address A.B.C.D

[Purpose]

Specify the source IP of the remote mirror tunnel.

[Parameters]

ParameterDescription
A.B.C.DIPv4 address

[View]

ERSPAN Mirror Configuration View

[Notes]

Run command no origin to delete the source IP.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# origin ip address 10.0.0.2

[Command]

destination ip address A.B.C.D

[Purpose]

Specify the destination IP of the remote mirror tunnel.

[Parameters]

ParameterDescription
A.B.C.DIPv4 address

[View]

ERSPAN Mirror Configuration View

[Notes]

Run command no destination to delete the destination IP.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# destination ip address 10.0.0.2

[Command]

ip ttl ttl_value

[Purpose]

Specify TTL value of the remote mirror tunnel.

[Parameters]

ParameterDescription
ttl_valueTTL value, the range is [1,255]

[View]

ERSPAN Mirror Configuration View

[Notes]

Run command no ip ttl ttl_value to delete TTL value configuration.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# ip ttl 10

[Command]

ipdscp dscp_value

[Purpose]

Specify DSCP value of the remote mirror tunnel.

[Parameters]

ParameterDescription
dscp_valueDSCP value, the range is [0,63]

[View]

ERSPAN Mirror Configuration View

[Notes]

Run command no ipdscp dscp_value to delete DSCP value configuration.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# ip dscp 10

[Command]

queue queue-id

[Purpose]

Specify the queue that the remote mirror tunnel is bound to.

[Parameters]

ParameterDescription
queue-idQueue ID, the range is [0,7]

[View]

ERSPAN Mirror Configuration View

[Notes]

Run command no queue id to unbind the queue.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# queue 5

[Command]

gre_type type

[Purpose]

Specify the type of the remote mirror tunnel.

[Parameters]

ParameterDescription
typeGRE type in 0xHHHH format.

[View]

ERSPAN Mirror Configuration View

[Notes]

Run command no gre_type type to delete the type configuration.

[Use Cases]

sonic# configure
sonic(config)# mirror session 10 type erspan
sonic(config-erspan-mirror-10)# gre_type 0x886e

Table 5 INT View

CommandPurpose
show collector sessionDisplay INT configuration

[Command]

show collector session

[Purpose]

Display INT configuration

[View]

Privileged User View

[Use Cases]

sonic# show collector session

Table 6 INT Config

CommandPurpose
collector parser enableEnable INT
collector high_delay sip A.B.C.D dip A.B.C.D cos cos_value delay_threshold delay_value ports ports_name [ttl ttl_value|dscp dscp_value|tc tc_value|df df_value] sampler_mode {probabilistic [capture_rate capture_rate_value]|microburst [max_packets_rate max_rate_value|max_packets_per_burst max_burst_value]} collection_mode {local [cpu_queue_rate cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}Set high_delay mode.
collector buffer_drop sip A.B.C.D dip A.B.C.D cos cos_value [ttl ttl_value|dscp dscp_value|tc tc_value|df df_value] sampler_mode {all|probabilistic [capture_rate capture_rate_value]|microburst [max_packets_rate max_rate_value|max_packets_per_burst max_burst_value]} collection_mode {local [cpu_queue_rate cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}Set buffer_drop mode.

[Command]

collector parser enable

[Purpose]

Enable INT

[View]

Global Configuration View

[Notes]

Run command no collector parser enable to enable INT.

[Use Cases]

sonic# configure
sonic(config)# collector parser enable

collector high_delay sip A.B.C.D dip A.B.C.D cos cos_value delay_threshold delay_value ports ports_name [ttl ttl_value|dscp dscp_value|tc tc_value|df df_value] sampler_mode {probabilistic [capture_rate capture_rate_value]|microburst [max_packets_rate max_rate_value|max_packets_per_burst max_burst_value]} collection_mode {local [cpu_queue_rate cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}

Section titled “collector high_delay sip A.B.C.D dip A.B.C.D cos cos_value delay_threshold delay_value ports ports_name [ttl ttl_value|dscp dscp_value|tc tc_value|df df_value] sampler_mode {probabilistic [capture_rate capture_rate_value]|microburst [max_packets_rate max_rate_value|max_packets_per_burst max_burst_value]} collection_mode {local [cpu_queue_rate cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}”

[Command]

collector high_delay sip A.B.C.D dip A.B.C.D cos cos_value delay_threshold delay_value ports ports_name [ttl ttl_value|dscp dscp_value|tc tc_value|df df_value] sampler_mode {probabilistic [capture_rate capture_rate_value]|microburst [max_packets_rate max_rate_value|max_packets_per_burst max_burst_value]} collection_mode {local [cpu_queue_rate cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}

[Purpose]

Set high_delay mode.

[Parameters]

ParameterDescription
A.B.C.DSource and destination IPv4 addresses, used to encapsulate INT packets.
cosList of cos to monitor for BDC and HDC, can be configured with one or more, eg. 0,5-7.
delay_valueHigh Delay Threshold in nanoseconds.
ports_nameMatching ports can be configured with one or more or all, e.g. 0/0,0/4, all.
ttl_valueTTL value, default is 255, range (1-255), used to encapsulate INT packets.
dscp_valueDSCP value, default to 0, range (0-63), used to encapsulate INT packets.
tc_valueINT message export queue, default to 0, range (0-7), cannot be configured as lossless queue.
df_valueDF flag, default is 0, range (0-1).
capture_rate_valueCapture rate (1 in every N pkts) for visibility sampler in Probabilistic Capture mode. This specifies ‘N’ for the rate. N defaults to 10000, range (10-16,777,215).
max_rate_valueMax rate (pkts/sec) of buffer dropped packets to be captured, default is 8192, range (122-100,000).
max_burst_valueMax number of buffer dropped packets to be captured per burst in multiples of 64, default is 256, range (64-16,384).
cpu_rate_valueMax rate (pkts/sec) on cpu_queue, default is 1000, range (122-60,000,000).
cpu_size_valueBust size for packets on cpu_queue, default is 512, range (1-1,000,000,000).

[View]

Global Configuration View

[Notes]

Run command no collector high_delay to delete HDC.

[Use Cases]

sonic# configure
sonic(config)# collector high_delay sip 10.250.0.141 dip 10.250.0.142 cos 0 delay_threshold 100 ports 0/0,0/4 sampler_mode microburst collection_mode local

collector buffer_drop sip A.B.C.D dip A.B.C.D cos cos_value [ttl ttl_value|dscp dscp_value|tc tc_value|df df_value] sampler_mode {all|probabilistic [capture_rate capture_rate_value]|microburst [max_packets_rate max_rate_value|max_packets_per_burst max_burst_value]} collection_mode {local [cpu_queue_rate cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}

Section titled “collector buffer_drop sip A.B.C.D dip A.B.C.D cos cos_value [ttl ttl_value|dscp dscp_value|tc tc_value|df df_value] sampler_mode {all|probabilistic [capture_rate capture_rate_value]|microburst [max_packets_rate max_rate_value|max_packets_per_burst max_burst_value]} collection_mode {local [cpu_queue_rate cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}”

[Command]

collector buffer_drop sip A.B.C.D dip A.B.C.D cos cos_value [ttl ttl_value|dscp dscp_value|tc tc_value|df df_value] sampler_mode {all|probabilistic [capture_rate capture_rate_value]|microburst [max_packets_rate max_rate_value|max_packets_per_burst max_burst_value]} collection_mode {local [cpu_queue_rate cpu_rate_value|cpu_queue_burst_size cpu_size_value]|remote}

[Purpose]

Set buffer_drop mode.

[Parameters]

ParameterDescription
A.B.C.DSource and destination IPv4 addresses, used to encapsulate INT packets.
cosList of cos to monitor for BDC and HDC, cannot be configured as lossless queue, can be configured with one or more, eg. 0,5-7.
ttl_valueTTL value, default is 255, range (1-255), used to encapsulate INT packets.
dscp_valueDSCP value, default to 0, range (0-63), used to encapsulate INT messages.
tc_valueINT message export queue, default to 0, range (0-7), cannot be configured as lossless queue.
df_valueDF flag, default is 0, range (0-1).
capture_rate_valueCapture rate (1 in every N pkts) for visibility sampler in Probabilistic Capture mode. This specifies ‘N’ for the rate. N defaults to 10000, range (10-16,777,215).
max_rate_valueMax rate (pkts/sec) of buffer dropped packets to be captured, default is 8192, range (122-100,000).
max_burst_valueMax number of buffer dropped packets to be captured per burst in multiples of 64, default is 256, range (64-16,384).
cpu_rate_valueMax rate (pkts/sec) on cpu_queue, default is 1000, range (122-60,000,000).
cpu_size_valueBust size for packets on cpu_queue, default to 512, range (1-1,000,000,000).

[View]

Global Configuration View

[Notes]

Run command no collector buffer_drop to delete BDC.

[Use Cases]

sonic# configure
sonic# collector buffer_drop sip 10.250.0.141 dip 10.250.0.142 cos 0 sampler_mode microburst collection_mode local

Table 7 sFlow View

CommandPurpose
show sflowDisplay global configuration of sFlow.
show sflow interface ethernet interface_nameDisplay interface configuration of sFlow.

[Command]

show sflow

[Purpose]

Display global configuration of sFlow.

[View]

Privileged User View

[Use Cases]

sonic# show sflow

show sflow interface ethernet interface_name

Section titled “show sflow interface ethernet interface_name”

[Command]

show sflow interface ethernet interface_name

[Purpose]

Display interface configuration of sFlow.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View]

Privileged User View

[Use Cases]

sonic# show sflow interface ethernet 0/0

Table 8 sFlow Config

CommandPurpose
sflow enableEnable sFlow feature.
sflow collector collector-name ip-address [VRF vrf|dst_port]Set the collector for sFlow.
sflow polling-interval intervalSet the sampling interval for sFlow.
sflow disableDisable sFlow feature of the interface.
sflow sample-rate rateSet the sampling frequency for interface sFlow.
sflow agent-id {ethernet|link-aggregation|loopback|mgmt|vlan} interface_nameSet the agent ID for sFlow sampling.
sflow collector collector-name source {A.B.C.D|A::B}Configure the source IP of sFlow collector.
sflow collector collector-name source-interface {ethernet|link-aggregation|loopback|mgmt|vlan} interface_nameConfigure the source interface of sFlow collector.

[Command]

sflow enable

[Purpose]

Enable sFlow feature.

[View]

Global Configuration View

[Notes]

Run command no sflow enable to disable sFlow feature.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow enable

sflow collector collector-name ip-address [VRF vrf|dst_port]

Section titled “sflow collector collector-name ip-address [VRF vrf|dst_port]”

[Command]

sflow collector collector-name ip-address [VRF vrf|dst_port]

[Purpose]

Set the collector for sFlow.

[Parameters]

ParameterDescription
collector-nameName of sFlow collector, in string form (length 1-16 characters)
ip-addressDestination IP address.
vrfSpecify VRF for sampling, only supports management port VRF and default VRF
dst_portDestination port number, the range is [1,65536], the default value is 6343.

[View]

Global Configuration View

[Notes]

Run command no sflow collector collector-name to delete sflow collector.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow collector 1 10.0.0.3 6
sonic(config)# sflow collector 2 10.0.0.4

[Command]

sflow polling-interval interval

[Purpose]

Set the sampling interval for sFlow.

[Parameters]

ParameterDescription
intervalSpecify the interval in seconds. The range is from 5 to 300, and the default is 1.

[View]

Global Configuration View

[Notes]

Run command no sflow polling-interval to restore the sampling interval to default.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow polling-interval 300

[Command]

sflow disable

[Purpose]

Disable sFlow feature of the interface.

[View]

Physical Interface Configuration View

[Notes]

Run command no sflow disable to enable sFlow feature of the interface.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# sflow disable

[Command]

sflow sample-rate rate

[Purpose]

Configure the sampling frequency of sFlow globally or on the interface.

[Parameters]

ParameterDescription
rateFrequency value, the range is 4096-1000000, the default value is 10000.

[View]

Physical Interface Configuration View

[Notes]

Run command no sflow sample-rate to restore the sampling frequency to default.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow sample-rate 70000
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# sflow sample-rate 50000
Section titled “sflow agent-id {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name”

[Command]

sflow agent-id {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name

[Purpose]

Configure the agent ID for sFlow sampling.

[Parameters]

ParameterDescription
interface_nameInterface name.

[View]

Global Configuration View

[Notes]

After specifying the agent ID, the agent IP address is the IP address of the specified interface. Run command no sflow sgent-id to restore the agent ID to its default value, with the agent IP address set to 240.127.1.1 by default.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow agent-id ethernet 0/10

sflow collector collector-name source {A.B.C.D|A::B}

Section titled “sflow collector collector-name source {A.B.C.D|A::B}”

[Command]

sflow collector collector-name source {A.B.C.D|A::B}

[Purpose]

Configure the source IP of sFlow collector.

[Parameters]

ParameterDescription
collector-nameName of sFlow collector, in string form (length 1-16 characters)
A.B.C.DIPv4 address
A::BIPv6 address

[View]

Physical Interface Configuration View

[Notes]

Run command no sflow collector collector-name source to delete the source IP of sFlow collector.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow collector test 39.0.0.2
sonic(config)# sflow collector test source 100.0.0.1
Section titled “sflow collector collector-name source-interface {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name”

[Command]

sflow collector collector-name source-interface {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name

[Purpose]

Configure the source interface of sFlow collector.

[Parameters]

ParameterDescription
collector-nameName of sFlow collector, in string form (length 1-16 characters)
interface_nameInterface name

[View]

Physical Interface Configuration View

[Notes]

Run command no sflow collector collector-name source-interface to delete the source interface of sFlow collector.

[Use Cases]

sonic# configure terminal
sonic(config)# sflow collector test 39.0.0.2
sonic(config)# sflow collector test source-interface ethernet 0/24

Table 9 SNMP View

CommandPurpose
show snmp-agent trap-targetDisplay trap configuration of SNMP agent.
show snmp-agent sourceDisplay source of SNMP agent.
show snmp-agent userDisplay SNMPv3 user configuration.
show snmp-agent communityDisplay SNMP community configuration.
show snmp-agent controlDisplay SNMP control information for Asterfusion private nodes/BGP nodes/RIB nodes.

[Command]

show snmp-agent trap-target

[Purpose]

Display SNMP agent trap configuration.

[View]

Privileged User View

[Use Cases]

sonic# show snmp-agent trap-target

[Command]

show snmp-agent source

[Purpose]

Display SNMP agent source.

[View]

Privileged User View

[Use Cases]

sonic# show snmp-agent source

[Command]

show snmp-agent user

[Purpose]

Display SNMPv3 user configuration.

[View]

Privileged User View

[Use Cases]

sonic# show snmp-agent user

[Command]

show snmp-agent community

[Purpose]

Display SNMP community configuration.

[View]

Privileged User View

[Use Cases]

sonic# show snmp-agent community

[Command]

show snmp-agent control

[Purpose]

Display SNMP control information for Asterfusion private nodes.

[View]

Privileged User View

[Use Cases]

Evpn-Leaf169# show snmp-agent control
Switch String Switch State
------------------- --------------
bgp disable
rib disable
roce-running-config disable
roce-stats disable

Table 10 SNMP Config

CommandPurpose
snmp-agent community [cipher] community_name [RO|RW]Configure the community of SNMP agent.
snmp-agent user user_name [authentication-mode authen-protocol authKey [privacy-mode privacy-protocol privKey]]Configure the user of SNMP agent.
snmp-agent trap-target {v1|v2c|v3} ip-address [udp-port portnum] [vrf vrf_name] [community community_name|user user_name]Configure the trap target of SNMP agent.
snmp-agent source ip-address [udp-port portnum] [vrf vrf_name]Configure the listening address of SNMP agent.
snmp-agent control enable {roce stats| roce running-config |bgp |rib}Allow SNMP agent to access Asterfusion private nodes/BGP nodes/RIB nodes

snmp-agent community [cipher] community_name [RO|RW]

Section titled “snmp-agent community [cipher] community_name [RO|RW]”

[Command]

snmp-agent community [cipher] community_name [RO|RW]

[Purpose]

Configure the community of SNMP agent.

[Parameters]

ParameterDescription
cipherConfiguration of cipher mode
community_nameCommunity name
RORead-Only, the default value is RO
RWRead-Write

[View]

Global Configuration View

[Notes]

Run command no snmp-agent [cipher] community community_name to delete SNMP community configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# snmp-agent community comm1 RO

snmp-agent user user_name [authentication-mode authen-protocol authKey [privacy-mode privacy-protocol privKey]]

Section titled “snmp-agent user user_name [authentication-mode authen-protocol authKey [privacy-mode privacy-protocol privKey]]”

[Command]

snmp-agent user user_name [authentication-mode authen-protocol authKey [privacy-mode privacy-protocol privKey]]

[Purpose]

Configure the user of SNMP agent.

[Parameters]

ParameterDescription
user_nameName of the user.
authen-protocolAuthentication protocol, either md5 or sha.
authKeyAuthentication password, in string form, length 8-32 bits.
privacy-protocolPrivacy protocol, either des or aes.
privKeyPrivacy key, in string form, length 8-32 bits.

[View]

Global Configuration View

[Notes]

Run command no snmp-agent user user_name to delete SNMPv3 agent user configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# snmp-agent user user3 authentication-mode md5 12345678 privacy-mode des 87654321
sonic(config)# snmp-agent user user4
sonic(config)# snmp-agent user user5 authentication-mode md5 12345678

snmp-agent trap-target {v1|v2c|v3} ip-address [udp-port portnum] [vrf vrf_name] [community community_name|user user_name]

Section titled “snmp-agent trap-target {v1|v2c|v3} ip-address [udp-port portnum] [vrf vrf_name] [community community_name|user user_name]”

[Command]

snmp-agent trap-target {v1|v2c|v3} ip-address [udp-port portnum] [vrf vrf_name] [community community_name|user user_name]

[Purpose]

Configure the trap target of SNMP agent.

[Parameters]

ParameterDescription
ip-addressSNMP-Agent Trap Target IP address
portnumSpecify the port number, the default is 162.
vrf_nameSpecify the VRF name, the default VRF is default.
community_nameCommunity name.
user_nameName of the user.

[View]

Global Configuration View

[Notes]

Run command no snmp-agent trap-target {v1|v2c|v3} to delete the trap target of SNMP agent.

[Use Cases]

sonic# configure terminal
sonic(config)# snmp-agent trap-target v1 10.250.0.221
sonic(config)# snmp-agent trap-target v2c 10.250.0.221 udp-port 163 community comm1

snmp-agent source ip-address [udp-port portnum] [vrf vrf_name]

Section titled “snmp-agent source ip-address [udp-port portnum] [vrf vrf_name]”

[Command]

snmp-agent source ip-address [udp-port portnum] [vrf vrf_name]

[Purpose]

Configure the listening address of SNMP agent.

[Parameters]

ParameterDescription
ip-addressThe listening IP address.
portnumSpecify the port number, the default is 161.
vrf_nameSpecify the VRF name, the default VRF is default.

[View]

Global Configuration View

[Notes]

Run command no snmp-agent source ip-address to delete the listening address of SNMP agent.

[Use Cases]

sonic# configure terminal
sonic(config)# snmp-agent source 10.250.0.221
sonic(config)# snmp-agent source 10.250.0.221 udp-port 163

snmp-agent control enable {roce stats| roce running-config |bgp |rib}

Section titled “snmp-agent control enable {roce stats| roce running-config |bgp |rib}”

[Command]

snmp-agent control enable {roce stats|roce running-config|bgp|rib}

[Purpose]

Allow SNMP agent to access Asterfusion private nodes/BGP nodes/RIB nodes

[Parameters]

ParameterDescription
roce running-configConfiguration information of RoCE related ports and queues
roce statsTraffic statistics of RoCE-related ports and queues
bgpBGP information
ribRIB information, include arp, MAC, route

[View]

Global Configuration View

[Notes]

Disabled by default, needs to be enabled manually. Run command no snmp-agent control enable {roce stats| roce running-config |bgp |rib} to disable this function

[Use Cases]

sonic# configure terminal
sonic(config)# snmp-agent control enable roce stats
Restarting SNMP service...

Table 11 Telemetry Config

CommandPurpose
telemetry clientCreate the Telemetry client and enter the Telemetry client configuration view.
destination-group destination-group-nameCreate the Telemetry collector group and enter the Telemetry collector group configuration view.
[ipv4-address A.B.C.D|ipv6-address A::B] port port-numberConfigure the collector’s IP address and port number.
subscription subscription-nameCreate a Telemetry subscription and enter the Telemetry subscription configuration view.
destination-group destination-group-nameConfigure the collector group associated with the subscription.
path-target [COUNTERS_DB|STATE_DB|OTHERS]Configure collection target.
paths path-nameConfigure collection path.
report-interval timeConfigure reporting interval.
report-type [periodic|stream]Configure reporting method.

[Command]

telemetry client

[Purpose]

Create the Telemetry client and enter the Telemetry client configuration view.

[View]

Global Configuration View

[Notes]

Run command no telemetry client to delete the Telemetry client configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)#

[Command]

destination-group destination-group-name

[Purpose]

Create the Telemetry collector group and enter the Telemetry collector group configuration view.

[Parameters]

ParameterDescription
destination-group-nameCollector group name

[View]

Telemetry Client Configuration View

[Notes]

Run command no destination-group destination-group-name to delete the Telemetry collector group configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# destination-group test

[ipv4-address A.B.C.D|ipv6-address A::B] port port-number

Section titled “[ipv4-address A.B.C.D|ipv6-address A::B] port port-number”

[Command]

[ipv4-address A.B.C.D|ipv6-address A::B] port port-number

[Purpose]

Configure the collector’s IP address and port number.

[Parameters]

ParameterDescription
A.B.C.DCollector IP
A::BCollector IPv6
port-numberCollector Port Number, the range is [1, 65535]

[View]

Telemetry Collector Group Configuration View

[Notes]

Run command no [ipv4-address A.B.C.D|ipv6-address A::B] port port-number to delete the Telemetry collector configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# destination-group test
sonic(telemetry-destination-group-test)# ipv4-address 192.168.20.102 port 8081

[Command]

subscription subscription-name

[Purpose]

Create a Telemetry subscription and enter the Telemetry subscription configuration view.

[Parameters]

ParameterDescription
subscription-nameSubscription name

[View]

Telemetry Client Configuration View

[Notes]

Run command no subscription subscription-name to delete the Telemetry subscription configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test

[Command]

destination-group destination-group-name

[Purpose]

Configure the collector group associated with the subscription.

[Parameters]

ParameterDescription
destination-group-nameCollector group name

[View]

Telemetry Subscription Configuration View

[Notes]

Run command no destination-group destination-group-name to delete the collector group associated with the subscription configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test
sonic(telemetry-subscription-test)# destination-group test

[Command]

path-target [COUNTERS_DB|STATE_DB|OTHERS]

[Purpose]

Configure collection target.

[View]

Telemetry Subscription Configuration View

[Notes]

Run command no path-target to delete the collection target configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test
sonic(telemetry-subscription-test)# path-target OTHERS

[Command]

paths path-name

[Purpose]

Configure collection path.

[Parameters]

ParameterDescription
path-nameCollection path, subfolders are separated by ‘/’, multiple settings are allowed.

[View]

Telemetry Subscription Configuration View

[Notes]

Run command no paths path-name to delete the collection path configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test
sonic(telemetry-subscription-test)# paths platform/cpu

[Command]

report-interval time

[Purpose]

Configure reporting interval.

[Parameters]

ParameterDescription
timeInterval, the unit is milliseconds, the range is [100, 1800000], with a default value of 5000 milliseconds.

[View]

Telemetry Subscription Configuration View

[Notes]

Run command no report-interval to delete the reporting interval configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test
sonic(telemetry-subscription-test)# report-interval 10000

[Command]

report-type [periodic|stream]

[Purpose]

Configure reporting method.

[View]

Telemetry Subscription Configuration View

[Notes]

Run command no report-type to delete the reporting method configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# telemetry client
sonic(telemetry-client)# subscription test
sonic(telemetry-subscription-test)# report-type periodic