Visibility and Monitoring
Exporter
Section titled “Exporter”Exporter View
Section titled “Exporter View”Table 1 Exporter View
Command | Purpose |
---|---|
show exporter | Display exporter configuration |
show exporter
Section titled “show exporter”[Command]
show exporter
[Purpose]
Display exporter configuration
[View]
Privileged User View
[Use Cases]
sonic# show exporterexporter cache duration: - bgp: default - device: default - evpn: default - sag: default - mclag: default - ntp: default - interface: default - roce_stats: defaultexporter capture interval: - bgp: default - device: default - evpn: default - sag: default - mclag: default - ntp: default
Exporter Config
Section titled “Exporter Config”Table 2 Exporter Config
Command | Purpose |
---|---|
exporter cache-duration {bgp|device|evpn|sag|mclag|ntp|roce_stats|interface} time | Configure the cache duration of each module in the exporter |
exporter capture-interval {bgp|device|evpn|sag|mclag|ntp} time | Configure the capture time interval for each module of the exporter |
exporter millisecond_level_monitoring enable | Activate 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]
Parameter | Description |
---|---|
time | Cache 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# configuresonic(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]
Parameter | Description |
---|---|
time | Capture 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# configuresonic(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# configuresonic(config)# exporter millisecond_level_monitoring enable
Mirror
Section titled “Mirror”Mirror View
Section titled “Mirror View”Table 3 Mirror View
Command | Purpose |
---|---|
show mirror | Display mirror configuration. |
show mirror
Section titled “show mirror”[Command]
show mirror
[Purpose]
Display mirror configuration.
[View]
Privileged User View
[Use Cases]
sonic# show mirror
Mirror Config
Section titled “Mirror Config”Table 4 Mirror Config
Command | Purpose |
---|---|
mirror session session-id type {span|erspan} | Create a mirror session. |
source interface ethernet interface_name | Specify the source interface of the local mirror. |
destination interface ethernet interface_name | Specify the destination interface of the local mirror. |
direction [in|out|both] | Specify local mirror diretion |
origin ip address A.B.C.D | Specify the source IP of the remote mirror tunnel. |
destination ip address A.B.C.D | Specify the destination IP of the remote mirror tunnel. |
ip ttl ttl_value | Specify TTL value of the remote mirror tunnel. |
ip dscp dscp_value | Specify DSCP value of the remote mirror tunnel. |
queue queue-id | Specify the queue that the remote mirror tunnel is bound to. |
gre_type type | Specify 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]
Parameter | Description |
---|---|
session-id | Mirror 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# configuresonic(config)# mirror session 0 type spansonic(config)# mirror session 1 type erspan
source interface ethernet interface_name
Section titled “source interface ethernet interface_name”[Command]
source interface ethernet interface_name
[Purpose]
Specify the source interface of the local mirror.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface 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# configuresonic(config)# mirror session 10 type spansonic(config-span-mirror-10)# source interface ethernet 0/56sonic(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]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
[View]
SPAN Mirror Configuration View
[Notes]
Run command no destination to delete the destination interface.
[Use Cases]
sonic# configuresonic(config)# mirror session 10 type spansonic(config-span-mirror-10)# no source interface ethernet 0/56
direction [in|out|both]
Section titled “direction [in|out|both]”[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# configuresonic(config)# mirror session 10 type spansonic(config-span-mirror-10)# direction in
origin ip address A.B.C.D
Section titled “origin ip address A.B.C.D”[Command]
origin ip address A.B.C.D
[Purpose]
Specify the source IP of the remote mirror tunnel.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address |
[View]
ERSPAN Mirror Configuration View
[Notes]
Run command no origin to delete the source IP.
[Use Cases]
sonic# configuresonic(config)# mirror session 10 type erspansonic(config-erspan-mirror-10)# origin ip address 10.0.0.2
destination ip address A.B.C.D
Section titled “destination ip address A.B.C.D”[Command]
destination ip address A.B.C.D
[Purpose]
Specify the destination IP of the remote mirror tunnel.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address |
[View]
ERSPAN Mirror Configuration View
[Notes]
Run command no destination to delete the destination IP.
[Use Cases]
sonic# configuresonic(config)# mirror session 10 type erspansonic(config-erspan-mirror-10)# destination ip address 10.0.0.2
ip ttl ttl_value
Section titled “ip ttl ttl_value”[Command]
ip ttl ttl_value
[Purpose]
Specify TTL value of the remote mirror tunnel.
[Parameters]
Parameter | Description |
---|---|
ttl_value | TTL 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# configuresonic(config)# mirror session 10 type erspansonic(config-erspan-mirror-10)# ip ttl 10
ip dscp dscp_value
Section titled “ip dscp dscp_value”[Command]
ipdscp dscp_value
[Purpose]
Specify DSCP value of the remote mirror tunnel.
[Parameters]
Parameter | Description |
---|---|
dscp_value | DSCP 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# configuresonic(config)# mirror session 10 type erspansonic(config-erspan-mirror-10)# ip dscp 10
queue queue-id
Section titled “queue queue-id”[Command]
queue queue-id
[Purpose]
Specify the queue that the remote mirror tunnel is bound to.
[Parameters]
Parameter | Description |
---|---|
queue-id | Queue ID, the range is [0,7] |
[View]
ERSPAN Mirror Configuration View
[Notes]
Run command no queue id to unbind the queue.
[Use Cases]
sonic# configuresonic(config)# mirror session 10 type erspansonic(config-erspan-mirror-10)# queue 5
gre_type type
Section titled “gre_type type”[Command]
gre_type type
[Purpose]
Specify the type of the remote mirror tunnel.
[Parameters]
Parameter | Description |
---|---|
type | GRE type in 0xHHHH format. |
[View]
ERSPAN Mirror Configuration View
[Notes]
Run command no gre_type type to delete the type configuration.
[Use Cases]
sonic# configuresonic(config)# mirror session 10 type erspansonic(config-erspan-mirror-10)# gre_type 0x886e
Inband Network Telemetry (INT)
Section titled “Inband Network Telemetry (INT)”INT View
Section titled “INT View”Table 5 INT View
Command | Purpose |
---|---|
show collector session | Display INT configuration |
show collector session
Section titled “show collector session”[Command]
show collector session
[Purpose]
Display INT configuration
[View]
Privileged User View
[Use Cases]
sonic# show collector session
INT Config
Section titled “INT Config”Table 6 INT Config
Command | Purpose |
---|---|
collector parser enable | Enable 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. |
collector parser enable
Section titled “collector parser enable”[Command]
collector parser enable
[Purpose]
Enable INT
[View]
Global Configuration View
[Notes]
Run command no collector parser enable to enable INT.
[Use Cases]
sonic# configuresonic(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]
Parameter | Description |
---|---|
A.B.C.D | Source and destination IPv4 addresses, used to encapsulate INT packets. |
cos | List of cos to monitor for BDC and HDC, can be configured with one or more, eg. 0,5-7. |
delay_value | High Delay Threshold in nanoseconds. |
ports_name | Matching ports can be configured with one or more or all, e.g. 0/0,0/4, all. |
ttl_value | TTL value, default is 255, range (1-255), used to encapsulate INT packets. |
dscp_value | DSCP value, default to 0, range (0-63), used to encapsulate INT packets. |
tc_value | INT message export queue, default to 0, range (0-7), cannot be configured as lossless queue. |
df_value | DF flag, default is 0, range (0-1). |
capture_rate_value | Capture 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_value | Max rate (pkts/sec) of buffer dropped packets to be captured, default is 8192, range (122-100,000). |
max_burst_value | Max number of buffer dropped packets to be captured per burst in multiples of 64, default is 256, range (64-16,384). |
cpu_rate_value | Max rate (pkts/sec) on cpu_queue, default is 1000, range (122-60,000,000). |
cpu_size_value | Bust 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# configuresonic(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]
Parameter | Description |
---|---|
A.B.C.D | Source and destination IPv4 addresses, used to encapsulate INT packets. |
cos | List 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_value | TTL value, default is 255, range (1-255), used to encapsulate INT packets. |
dscp_value | DSCP value, default to 0, range (0-63), used to encapsulate INT messages. |
tc_value | INT message export queue, default to 0, range (0-7), cannot be configured as lossless queue. |
df_value | DF flag, default is 0, range (0-1). |
capture_rate_value | Capture 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_value | Max rate (pkts/sec) of buffer dropped packets to be captured, default is 8192, range (122-100,000). |
max_burst_value | Max number of buffer dropped packets to be captured per burst in multiples of 64, default is 256, range (64-16,384). |
cpu_rate_value | Max rate (pkts/sec) on cpu_queue, default is 1000, range (122-60,000,000). |
cpu_size_value | Bust 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# configuresonic# collector buffer_drop sip 10.250.0.141 dip 10.250.0.142 cos 0 sampler_mode microburst collection_mode local
sFlow View
Section titled “sFlow View”Table 7 sFlow View
Command | Purpose |
---|---|
show sflow | Display global configuration of sFlow. |
show sflow interface ethernet interface_name | Display interface configuration of sFlow. |
show sflow
Section titled “show 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]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
[View]
Privileged User View
[Use Cases]
sonic# show sflow interface ethernet 0/0
sFlow Config
Section titled “sFlow Config”Table 8 sFlow Config
Command | Purpose |
---|---|
sflow enable | Enable sFlow feature. |
sflow collector collector-name ip-address [VRF vrf|dst_port] | Set the collector for sFlow. |
sflow polling-interval interval | Set the sampling interval for sFlow. |
sflow disable | Disable sFlow feature of the interface. |
sflow sample-rate rate | Set the sampling frequency for interface sFlow. |
sflow agent-id {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name | Set 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_name | Configure the source interface of sFlow collector. |
sflow enable
Section titled “sflow enable”[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 terminalsonic(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]
Parameter | Description |
---|---|
collector-name | Name of sFlow collector, in string form (length 1-16 characters) |
ip-address | Destination IP address. |
vrf | Specify VRF for sampling, only supports management port VRF and default VRF |
dst_port | Destination 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 terminalsonic(config)# sflow collector 1 10.0.0.3 6sonic(config)# sflow collector 2 10.0.0.4
sflow polling-interval interval
Section titled “sflow polling-interval interval”[Command]
sflow polling-interval interval
[Purpose]
Set the sampling interval for sFlow.
[Parameters]
Parameter | Description |
---|---|
interval | Specify 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 terminalsonic(config)# sflow polling-interval 300
sflow disable
Section titled “sflow disable”[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 terminalsonic(config)# interface ethernet 0/0sonic(config-if-0/0)# sflow disable
sflow sample-rate rate
Section titled “sflow sample-rate rate”[Command]
sflow sample-rate rate
[Purpose]
Configure the sampling frequency of sFlow globally or on the interface.
[Parameters]
Parameter | Description |
---|---|
rate | Frequency 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 terminalsonic(config)# sflow sample-rate 70000sonic(config)# interface ethernet 0/0sonic(config-if-0/0)# sflow sample-rate 50000
sflow agent-id {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name
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]
Parameter | Description |
---|---|
interface_name | Interface 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 terminalsonic(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]
Parameter | Description |
---|---|
collector-name | Name of sFlow collector, in string form (length 1-16 characters) |
A.B.C.D | IPv4 address |
A::B | IPv6 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 terminalsonic(config)# sflow collector test 39.0.0.2sonic(config)# sflow collector test source 100.0.0.1
sflow collector collector-name source-interface {ethernet|link-aggregation|loopback|mgmt|vlan} interface_name
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]
Parameter | Description |
---|---|
collector-name | Name of sFlow collector, in string form (length 1-16 characters) |
interface_name | Interface 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 terminalsonic(config)# sflow collector test 39.0.0.2sonic(config)# sflow collector test source-interface ethernet 0/24
SNMP View
Section titled “SNMP View”Table 9 SNMP View
Command | Purpose |
---|---|
show snmp-agent trap-target | Display trap configuration of SNMP agent. |
show snmp-agent source | Display source of SNMP agent. |
show snmp-agent user | Display SNMPv3 user configuration. |
show snmp-agent community | Display SNMP community configuration. |
show snmp-agent control | Display SNMP control information for Asterfusion private nodes/BGP nodes/RIB nodes. |
show snmp-agent trap-target
Section titled “show snmp-agent trap-target”[Command]
show snmp-agent trap-target
[Purpose]
Display SNMP agent trap configuration.
[View]
Privileged User View
[Use Cases]
sonic# show snmp-agent trap-target
show snmp-agent source
Section titled “show snmp-agent source”[Command]
show snmp-agent source
[Purpose]
Display SNMP agent source.
[View]
Privileged User View
[Use Cases]
sonic# show snmp-agent source
show snmp-agent user
Section titled “show snmp-agent user”[Command]
show snmp-agent user
[Purpose]
Display SNMPv3 user configuration.
[View]
Privileged User View
[Use Cases]
sonic# show snmp-agent user
show snmp-agent community
Section titled “show snmp-agent community”[Command]
show snmp-agent community
[Purpose]
Display SNMP community configuration.
[View]
Privileged User View
[Use Cases]
sonic# show snmp-agent community
show snmp-agent control
Section titled “show snmp-agent control”[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 controlSwitch String Switch State------------------- --------------bgp disablerib disableroce-running-config disableroce-stats disable
SNMP Config
Section titled “SNMP Config”Table 10 SNMP Config
Command | Purpose |
---|---|
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]
Parameter | Description |
---|---|
cipher | Configuration of cipher mode |
community_name | Community name |
RO | Read-Only, the default value is RO |
RW | Read-Write |
[View]
Global Configuration View
[Notes]
Run command no snmp-agent [cipher] community community_name to delete SNMP community configuration.
[Use Cases]
sonic# configure terminalsonic(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]
Parameter | Description |
---|---|
user_name | Name of the user. |
authen-protocol | Authentication protocol, either md5 or sha. |
authKey | Authentication password, in string form, length 8-32 bits. |
privacy-protocol | Privacy protocol, either des or aes. |
privKey | Privacy 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 terminalsonic(config)# snmp-agent user user3 authentication-mode md5 12345678 privacy-mode des 87654321sonic(config)# snmp-agent user user4sonic(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]
Parameter | Description |
---|---|
ip-address | SNMP-Agent Trap Target IP address |
portnum | Specify the port number, the default is 162. |
vrf_name | Specify the VRF name, the default VRF is default. |
community_name | Community name. |
user_name | Name 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 terminalsonic(config)# snmp-agent trap-target v1 10.250.0.221sonic(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]
Parameter | Description |
---|---|
ip-address | The listening IP address. |
portnum | Specify the port number, the default is 161. |
vrf_name | Specify 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 terminalsonic(config)# snmp-agent source 10.250.0.221sonic(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]
Parameter | Description |
---|---|
roce running-config | Configuration information of RoCE related ports and queues |
roce stats | Traffic statistics of RoCE-related ports and queues |
bgp | BGP information |
rib | RIB 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 terminalsonic(config)# snmp-agent control enable roce statsRestarting SNMP service...
Telemetry
Section titled “Telemetry”Telemetry Config
Section titled “Telemetry Config”Table 11 Telemetry Config
Command | Purpose |
---|---|
telemetry client | Create the Telemetry client and enter the Telemetry client configuration view. |
destination-group destination-group-name | Create the Telemetry collector group and enter the Telemetry collector group configuration view. |
[ipv4-address A.B.C.D|ipv6-address A::B] port port-number | Configure the collector’s IP address and port number. |
subscription subscription-name | Create a Telemetry subscription and enter the Telemetry subscription configuration view. |
destination-group destination-group-name | Configure the collector group associated with the subscription. |
path-target [COUNTERS_DB|STATE_DB|OTHERS] | Configure collection target. |
paths path-name | Configure collection path. |
report-interval time | Configure reporting interval. |
report-type [periodic|stream] | Configure reporting method. |
telemetry client
Section titled “telemetry client”[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 terminalsonic(config)# telemetry clientsonic(telemetry-client)#
destination-group destination-group-name
Section titled “destination-group destination-group-name”[Command]
destination-group destination-group-name
[Purpose]
Create the Telemetry collector group and enter the Telemetry collector group configuration view.
[Parameters]
Parameter | Description |
---|---|
destination-group-name | Collector 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 terminalsonic(config)# telemetry clientsonic(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]
Parameter | Description |
---|---|
A.B.C.D | Collector IP |
A::B | Collector IPv6 |
port-number | Collector 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 terminalsonic(config)# telemetry clientsonic(telemetry-client)# destination-group testsonic(telemetry-destination-group-test)# ipv4-address 192.168.20.102 port 8081
subscription subscription-name
Section titled “subscription subscription-name”[Command]
subscription subscription-name
[Purpose]
Create a Telemetry subscription and enter the Telemetry subscription configuration view.
[Parameters]
Parameter | Description |
---|---|
subscription-name | Subscription name |
[View]
Telemetry Client Configuration View
[Notes]
Run command no subscription subscription-name to delete the Telemetry subscription configuration.
[Use Cases]
sonic# configure terminalsonic(config)# telemetry clientsonic(telemetry-client)# subscription test
destination-group destination-group-name
Section titled “destination-group destination-group-name”[Command]
destination-group destination-group-name
[Purpose]
Configure the collector group associated with the subscription.
[Parameters]
Parameter | Description |
---|---|
destination-group-name | Collector 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 terminalsonic(config)# telemetry clientsonic(telemetry-client)# subscription testsonic(telemetry-subscription-test)# destination-group test
path-target [COUNTERS_DB|STATE_DB|OTHERS]
Section titled “path-target [COUNTERS_DB|STATE_DB|OTHERS]”[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 terminalsonic(config)# telemetry clientsonic(telemetry-client)# subscription testsonic(telemetry-subscription-test)# path-target OTHERS
paths path-name
Section titled “paths path-name”[Command]
paths path-name
[Purpose]
Configure collection path.
[Parameters]
Parameter | Description |
---|---|
path-name | Collection 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 terminalsonic(config)# telemetry clientsonic(telemetry-client)# subscription testsonic(telemetry-subscription-test)# paths platform/cpu
report-interval time
Section titled “report-interval time”[Command]
report-interval time
[Purpose]
Configure reporting interval.
[Parameters]
Parameter | Description |
---|---|
time | Interval, 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 terminalsonic(config)# telemetry clientsonic(telemetry-client)# subscription testsonic(telemetry-subscription-test)# report-interval 10000
report-type [periodic|stream]
Section titled “report-type [periodic|stream]”[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 terminalsonic(config)# telemetry clientsonic(telemetry-client)# subscription testsonic(telemetry-subscription-test)# report-type periodic