Open Telemetry 导出

遥测技术使您能够收集、发送和分析大量数据,例如流量统计信息、端口状态、设备健康状况和配置以及事件。 这些数据可帮助您监控交换机的性能、健康状况和行为、流量模式和 QoS

配置 Open Telemetry

Cumulus Linux 支持 Open Telemetry (OTEL) 导出。 您可以使用 OTLP 导出指标,例如接口计数器、缓冲区统计信息、直方图收集、平台统计信息和路由指标到外部收集器,以进行分析和可视化。

Cumulus Linux 支持在配备 Spectrum-2 ASIC 及更高版本的交换机上进行 Open Telemetry 导出。

要启用 Open Telemetry

cumulus@switch:~$ nv set system telemetry export otlp state enabled 
cumulus@switch:~$ nv config apply

当您启用 Open Telemetry 时,交换机默认收集系统信息指标并将其导出到配置的外部收集器。 此外,您可以启用 Open Telemetry 以收集和导出接口统计信息缓冲区统计信息直方图数据控制平面统计信息平台统计信息路由指标

接口统计信息

当您为接口统计信息启用 Open Telemetry 时,交换机会导出所有配置接口上的接口统计信息

cumulus@switch:~$ nv set system telemetry interface-stats export state enabled
cumulus@switch:~$ nv config apply

您可以调整接口统计信息的采样间隔(以秒为单位)。 您可以指定介于 1 到 86400 之间的值。 默认值为 1。

cumulus@switch:~$ nv set system telemetry interface-stats sample-interval 100
cumulus@switch:~$ nv config apply

您可以启用这些额外的接口统计信息

  • 入口缓冲区流量类别(0 到 15)和出口缓冲区优先级组(0 到 7)的流量类别和交换机优先级指标
  • 用于接口 PHY 指标的 PHY

当您启用这些设置时,交换机会为定义的优先级组和流量类别导出 interface_pginterface_tc 计数器

cumulus@switch:~$ nv set system telemetry interface-stats ingress-buffer priority-group 4
cumulus@switch:~$ nv set system telemetry interface-stats egress-buffer traffic-class 12
cumulus@switch:~$ nv config apply

您可以为特定交换机优先级值在所有配置的接口上启用额外的交换机优先级接口统计信息收集

cumulus@switch:~$ nv set system telemetry interface-stats switch-priority 4
cumulus@switch:~$ nv config apply

当您启用此设置时,交换机会导出 nvswitch_interface_phynvswitch_interface_raw 接口 PHY 计数器

cumulus@switch:~$ nv set system telemetry interface-stats class phy state enabled
cumulus@switch:~$ nv config apply

要显示接口统计信息配置,请运行 nv show system telemetry interface-stats 命令。

缓冲区统计信息

当您为缓冲区统计信息启用 Open Telemetry 时,交换机会导出接口和交换机缓冲区占用率和水位线指标。

cumulus@switch:~$ nv set system telemetry buffer-stats export state enabled 
cumulus@switch:~$ nv config apply

要显示缓冲区统计信息配置,请运行 nv show system telemetry buffer-stats 命令。

控制平面统计信息

当您为控制平面统计信息启用 Open Telemetry 时,交换机会导出控制平面数据包的附加计数器

cumulus@switch:~$ nv set system telemetry control-plane-stats export state enabled
cumulus@switch:~$ nv config apply

您可以调整控制平面统计信息的采样间隔(以秒为单位)。 您可以指定介于 1 到 86400 之间的值。 默认值为 1。

cumulus@switch:~$ nv set system telemetry control-plane-stats sample-interval 100
cumulus@switch:~$ nv config apply

要显示控制平面统计信息配置,请运行 nv show system telemetry control-plane-stats 命令。

直方图数据

当您为直方图数据启用 Open Telemetry 时,您的缓冲区、计数器和延迟直方图收集配置定义了交换机导出的数据

cumulus@switch:~$ nv set system telemetry histogram export state enabled
cumulus@switch:~$ nv config apply

要显示直方图数据配置,请运行 nv show system telemetry histogram 命令。

平台统计信息

当您启用平台统计信息 Open Telemetry 时,交换机会导出有关 CPU、磁盘、文件系统、内存和传感器运行状况的数据。 要全局启用所有平台统计信息

cumulus@switch:~$ nv set system telemetry platform-stats export state enabled
cumulus@switch:~$ nv config apply

如果您不想启用所有平台统计信息,则可以启用或禁用单个平台遥测组件或调整单个组件的采样间隔。 默认采样间隔为 60 秒。

cumulus@switch:~$ nv set system telemetry platform-stats class cpu state enabled
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system telemetry platform-stats class cpu sample-interval 100
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system telemetry platform-stats class disk state enabled
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system telemetry platform-stats class disk sample-interval 100
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system telemetry platform-stats class file-system state enabled
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system telemetry platform-stats class file-system sample-interval 100
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system telemetry platform-stats class memory state enabled
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system telemetry platform-stats class memory sample-interval 100
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system telemetry platform-stats class environment-sensors state enabled
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system telemetry platform-stats class environment-sensors sample-interval 100
cumulus@switch:~$ nv config apply

要显示平台统计信息配置,请运行 nv show system telemetry platform-stats 命令。

路由指标

要为第 3 层路由指标启用 Open Telemetry,请启用 OTEL 路由服务

cumulus@switch:~$ nv set system telemetry router export state enabled
cumulus@switch:~$ nv config apply

要导出任何路由指标,您必须首先启用 OTEL 路由服务。

要启用跨所有 VRF 的 BGP 对等体状态统计信息的收集和导出

cumulus@switch:~$ nv set system telemetry router bgp export state enabled
cumulus@switch:~$ nv config apply

要启用特定 VRF 下所有 BGP 对等体的统计信息收集和导出,请运行 nv set system telemetry router vrf <vrf-id> bgp export state enabled 命令;例如

cumulus@switch:~$ nv set system telemetry router vrf RED bgp export state enabled
cumulus@switch:~$ nv config apply

要启用特定 VRF 下特定 BGP 对等体的统计信息收集和导出,请运行 nv set system telemetry router vrf <vrf-id> bgp peer <peer-id> export state enabled 命令;例如

cumulus@switch:~$ nv set system telemetry router vrf RED bgp peer swp1 export state enabled
cumulus@switch:~$ nv config apply

要启用跨所有 VRF 的 IP 路由表的统计信息收集和导出

cumulus@switch:~$ nv set system telemetry router rib export state enabled
cumulus@switch:~$ nv config apply 

要启用特定 VRF 的 IP 路由表的统计信息收集和导出,请运行 nv set system telemetry router vrf <vrf-id> rib export state enabled 命令;例如:

cumulus@switch:~$ nv set system telemetry router vrf RED rib export state enabled
cumulus@switch:~$ nv config apply

您可以调整路由指标的采样间隔(以秒为单位)。 您可以指定 10 的倍数,最大为 60。 默认值为 10。

cumulus@switch:~$ nv set system telemetry router sample-interval 30
cumulus@switch:~$ nv config apply

您可以使用 nv set telemetry router bgp export state disabled 命令禁用跨所有 VRF 的 BGP 导出,并使用 nv set telemetry router vrf <vrf-name> bgp export state enabled 命令仅为特定 VRF 启用 BGP 导出。 您还可以使用 nv set telemetry router vrf <vrf-name> bgp export state disabled 命令禁用 VRF 中所有对等体的 BGP 导出,并使用 nv set telemetry router vrf <vrf-name> bgp peer <peer> export state enabled 命令仅为 VRF 中的特定对等体启用遥测。

要显示路由指标配置设置,请运行 nv show system telemetry router 命令。

gRPC OTLP 导出

要配置 Open Telemetry 导出目标

  1. 通过提供收集器目标 IP 地址或主机名来配置 gRPC 以与收集器通信。 如果通信端口与默认端口 8443 不同,请指定要使用的端口

    cumulus@switch:~$ nv set system telemetry export otlp grpc destination 10.1.1.100 port 4317
    cumulus@switch:~$ nv config apply
    
  2. 配置 X.509 证书以保护 gRPC 连接

    cumulus@switch:~$ nv set system telemetry export otlp grpc cert-id <certificate>
    cumulus@switch:~$ nv config apply
    

默认情况下,OTLP 导出处于需要证书的安全模式。 对于没有配置证书的连接,您必须使用 nv set system telemetry export otlp grpc insecure enabled 命令启用 insecure 模式。

自定义导出

默认情况下,交换机将全局启用的所有统计信息(使用 nv set system telemetry <statistics> 命令)导出到所有配置的 OTLP 目标。 如果您想将不同的指标导出到不同的 OTLP 目标,您可以自定义导出,方法是指定一个统计信息组来控制您导出的统计信息以及目标的采样间隔。

统计信息组默认继承全局 OTLP 导出配置。 统计信息组下更具体的配置,例如启用或禁用统计信息类型或更改采样间隔,将覆盖任何全局 OTLP 配置。

以下示例

  • 配置 STAT-GROUP1 以导出所有平台统计信息 (platform-stats),但不导出接口统计信息 (interface-stats)。
  • 将 STAT-GROUP1 配置应用于 OTLP 目标 10.1.1.100。
cumulus@switch:~$ nv set system telemetry stats-group STAT-GROUP1 platform-stats export state enabled
cumulus@switch:~$ nv set system telemetry stats-group STAT-GROUP1 interface-stats export state disabled
cumulus@switch:~$ nv set system telemetry export otlp grpc destination 10.1.1.100 stats-group STAT-GROUP1
cumulus@switch:~$ nv config apply

以下示例

  • 配置 STAT-GROUP2 从全局遥测配置继承所有统计信息配置,但将 router 统计信息的采样间隔更改为 100
  • 将 STAT-GROUP2 配置应用于 OTLP 目标 10.1.1.200。
cumulus@switch:~$ nv set system telemetry stats-group STAT-GROUP2 router sample-interval 100
cumulus@switch:~$ nv set system telemetry export otlp grpc destination 10.1.1.200 stats-group STAT-GROUP2
cumulus@switch:~$ nv config apply

以下示例

  • 配置 STAT-GROUP3 以禁用直方图 (histogram) 和缓冲区 (buffer-stats) 统计信息,并启用除磁盘状态之外的所有平台统计信息(platform-stats)
  • 将 STAT-GROUP3 配置应用于 OTLP 目标 10.1.1.30。
cumulus@switch:~$ nv set system telemetry stats-group STAT-GROUP3 buffer-stats export state disabled
cumulus@switch:~$ nv set system telemetry stats-group STAT-GROUP3 histogram export state disabled
cumulus@switch:~$ nv set system telemetry stats-group STAT-GROUP3 platform-stats export state enabled
cumulus@switch:~$ nv set system telemetry stats-group STAT-GROUP3 platform-stats class disk state disabled
cumulus@switch:~$ nv set system telemetry export otlp grpc destination 10.1.1.30 stats-group STAT-GROUP3
cumulus@switch:~$ nv config apply

显示遥测导出配置

要显示遥测导出配置,请运行 nv show system telemetry export 命令

cumulus@switch:~$ nv show system telemetry export
                    applied   pending 
------------------  --------  --------
vrf                 default   default 
otlp                                  
  state             disabled  disabled
  grpc                                
    insecure  disabled  disabled
    port            8443      8443    
    [destination]             

要显示 OTLP gRPC 目标配置,请运行 nv show system telemetry export otlp grpc destination 命令。

静态标签

您可以将静态标签应用于交换机和各个接口,以配置设备和接口角色的描述。 导出的 OTLP 数据包括这些标签名称和描述。

  • Cumulus Linux 最多支持 10 个设备标签和 10 个接口标签。
  • 标签名称和描述字符串可以包含字母数字字符,以及下划线、句点或破折号。 如果字符串中包含空格,请将整个字符串用双引号或单引号括起来。

要配置交换机设备标签 Data_Center_Location 和一个字符串,将其标识为 Data_Center_B 的一部分

cumulus@switch:~$ nv set system telemetry label "Data Center Location" description "Data Center B"
cumulus@switch:~$ nv config apply

使用 nv show system telemetry label 命令验证设备标签配置

cumulus@switch:~$ nv show system telemetry label
                      description  
--------------------  -------------
Data Center Location  Data Center B

要配置交换机接口标签 interface_swp10_label,描述为 Server 10 connection

cumulus@switch:~$ nv set interface swp10 telemetry label "interface_swp10_label" description "Server 10 connection"
cumulus@switch:~$ nv config apply

使用 nv show system telemetry label 命令验证配置

cumulus@switch:~$ nv show system telemetry label
                      description  
--------------------  -------------
Data Center Location  Data Center B

使用 nv show interface <interface> telemetry label 命令验证接口标签配置

cumulus@switch:~$ nv show interface swp10 telemetry label
                       description         
---------------------  --------------------
interface_swp10_label  Server 10 connection

遥测数据格式

Cumulus Linux 以本节定义的格式导出统计信息和直方图数据。

系统信息格式

当您使用 nv set system telemetry export otlp state enabled 命令启用 Open Telemetry 时,交换机默认将以下系统信息指标导出到配置的 OTEL 收集器

名称描述
node_boot_time_seconds节点启动时间,以 Unix 时间戳表示。
node_time_seconds自纪元 (1970) 以来的系统时间,以秒为单位。
node_os_info操作系统和镜像信息,例如名称和版本。

接口统计信息格式

交换机导出到 OTEL 收集器的接口统计信息数据样本是 gauge 流,其中包括作为属性的接口名称和 asDouble exemplar 中报告的统计信息值。

名称描述
nvswitch_interface_oper_state接口操作状态,以位图形式表示:(None[0], Up[1], Down[2], Invalid[4], Error[8])
nvswitch_interface_dot3_control_in_unknown_opcodes输入 802.3 未知操作码计数器。
nvswitch_interface_dot3_in_pause_frames输入 802.3 暂停帧计数器。
nvswitch_interface_dot3_out_pause_frames输出 802.3 暂停帧计数器。
nvswitch_interface_dot3_stats_alignment_errors802.3 对齐错误计数器。
nvswitch_interface_dot3_stats_carrier_sense_errors802.3 接口载波侦听错误计数器。
nvswitch_interface_dot3_stats_deferred_transmissions802.3 延迟传输计数器。
nvswitch_interface_dot3_stats_excessive_collisions802.3 过度冲突计数器。
nvswitch_interface_dot3_stats_fcs_errors802.3 FCS 错误计数器。
nvswitch_interface_dot3_stats_frame_too_longs802.3 过大帧大小计数器。
nvswitch_interface_dot3_stats_internal_mac_receive_errors802.3 内部 MAC 接收错误计数器。
nvswitch_interface_dot3_stats_internal_mac_transmit_errors802.3 内部 MAC 传输错误计数器。
nvswitch_interface_dot3_stats_late_collisions802.3 晚期冲突计数器。
nvswitch_interface_dot3_stats_multiple_collision_frames802.3 多次冲突帧计数器。
nvswitch_interface_dot3_stats_single_collision_frames802.3 单次冲突帧计数器。
nvswitch_interface_dot3_stats_sqe_test_errors802.3 SQE 测试错误计数器。
nvswitch_interface_dot3_stats_symbol_errors802.3 符号错误计数器。
nvswitch_interface_performance_marked_packets接口性能标记数据包,标记为 eceecn
nvswitch_interface_discards_ingress_general接口入口通用丢弃计数器。
nvswitch_interface_discards_ingress_policy_engine接口入口策略引擎丢弃计数器。
nvswitch_interface_discards_ingress_vlan_membership接口入口 VLAN 成员资格过滤器丢弃计数器。
nvswitch_interface_discards_ingress_tag_frame_type接口入口 VLAN 标签过滤器丢弃计数器。
nvswitch_interface_discards_egress_vlan_membership接口出口 VLAN 成员资格过滤器丢弃计数器。
nvswitch_interface_discards_loopback_filter接口环回过滤器丢弃计数器。
nvswitch_interface_discards_egress_general接口出口通用丢弃计数器。
nvswitch_interface_discards_egress_link_down接口出口链路断开丢弃计数器。
nvswitch_interface_discards_egress_hoq接口出口队首超时丢弃。
nvswitch_interface_discards_port_isolation接口端口隔离过滤器丢弃。
nvswitch_interface_discards_egress_policy_engine接口出口策略引擎丢弃。
nvswitch_interface_discards_ingress_tx_link_down接口入口传输链路断开丢弃。
nvswitch_interface_discards_egress_stp_filter接口出口生成树过滤器丢弃。
nvswitch_interface_discards_egress_hoq_stall接口出口队首停顿丢弃。
nvswitch_interface_discards_egress_sll接口出口交换机生命周期限制丢弃。
nvswitch_interface_discards_ingress_discard_all接口入口总丢弃。
nvswitch_interface_tx_stats_pkts64octets传输的总数据包数,长度为 64 字节。
nvswitch_interface_tx_stats_pkts65-to127octets传输的总数据包数,长度为 64 字节。
nvswitch_interface_tx_stats_pkts256-to511octets传输的总数据包数,长度为 256-511 字节。
nvswitch_interface_tx_stats_pkts512-to1023octets传输的总数据包数,长度为 512-1023 字节。
nvswitch_interface_tx_stats_pkts1024-to1518octets传输的总数据包数,长度为 1024-1518 字节。
nvswitch_interface_tx_stats_pkts1519-to2047octets传输的总数据包数,长度为 1519-2047 字节。
nvswitch_interface_tx_stats_pkts2048-to4095octets传输的总数据包数,长度为 2048-4095 字节。
nvswitch_interface_tx_stats_pkts4096-to8191octets传输的总数据包数,长度为 4096-8191 字节。
nvswitch_interface_tx_stats_pkts8192-to10239octets传输的总数据包数,长度为 8192-10239 字节。
nvswitch_interface_ether_stats_pkts64octets接收的总数据包数,长度为 64 字节。
nvswitch_interface_ether_stats_pkts65to127octets接收的总数据包数,长度为 65-127 字节。
nvswitch_interface_ether_stats_pkts128to255octets接收的总数据包数,长度为 128-255 字节。
nvswitch_interface_ether_stats_pkts256to511octets接收的总数据包数,长度为 256-511 字节。
nvswitch_interface_ether_stats_pkts512to1023octets接收的总数据包数,长度为 512-1023 字节。
nvswitch_interface_ether_stats_pkts1024to1518octets接收的总数据包数,长度为 1024-1518 字节。
nvswitch_interface_ether_stats_pkts1519to2047octets接收的总数据包数,长度为 1519-2047 字节。
nvswitch_interface_ether_stats_pkts2048to4095octets接收的总数据包数,长度为 2048-4095 字节。
nvswitch_interface_ether_stats_pkts4096to8191octets接收的总数据包数,长度为 4096-8191 字节。
nvswitch_interface_ether_stats_pkts8192to10239octets接收的总数据包数,长度为 8192-10239 字节。
nvswitch_interface_carrier_up_changes_total接口的载波启动转换总数。
nvswitch_interface_carrier_last_change_time_ms接口上次载波更改的时间,以 Unix 纪元时间戳表示,精度为毫秒。
nvswitch_interface_carrier_down_changes_total接口的载波断开转换总数。
nvswitch_interface_carrier_changes_total接口的载波更改总数。
nvswitch_interface_mtu_bytes接口的运行 MTU,以字节为单位。
nvswitch_interface_info提供有关接口的信息:MAC 地址、双工模式、ifalias、接口名称、操作状态。
nvswitch_interface_iface_id接口的 ifindex。
nvswitch_interface_flags为接口设置的内核设备标志,以表示 内核 net_device 标志位掩码的整数形式。
nvswitch_interface_proto_down接口协议关闭状态。
nvswitch_interface_oper_aggregate_speed连接接口的速度,以比特/秒为单位。
nvswitch_interface_number_of_lanes接口使用的通道数。

当您配置 nv set system telemetry interface-stats egress-buffer traffic-class <class> 命令时,交换机收集并导出以下额外的接口流量类别统计信息

名称描述
nvswitch_interface_tc_tx_bc_frames接口出口流量类别传输广播帧计数器。
nvswitch_interface_tc_tx_ecn_marked_tc接口出口流量类别传输 ECN 标记计数器。
nvswitch_interface_tc_tx_frames接口出口流量类别传输帧计数器。
nvswitch_interface_tc_tx_mc_frames接口出口流量类别传输组播帧计数器。
nvswitch_interface_tc_tx_no_buffer_discard_uc接口出口流量类别传输单播无缓冲区丢弃计数器。
nvswitch_interface_tc_tx_octet接口出口流量类别传输字节计数器。
nvswitch_interface_tc_tx_queue接口出口流量类别传输队列计数器。
nvswitch_interface_tc_tx_uc_frames接口出口流量类别传输单播帧计数器。
nvswitch_interface_tc_tx_wred_discard接口出口流量类别传输 WRED 丢弃计数器。

当您配置 nv set system telemetry interface-stats ingress-buffer priority-group <priority> 命令时,交换机收集并导出以下额外的接口优先级组统计信息

名称描述
nvswitch_interface_pg_rx_buffer_discard接口入口优先级组接收缓冲区丢弃计数器。
nvswitch_interface_pg_rx_frames接口入口优先级组接收帧计数器。
nvswitch_interface_pg_rx_octets接口入口优先级组接收字节计数器。
nvswitch_interface_pg_rx_shared_buffer_discard接口入口优先级组接收共享缓冲区丢弃计数器。
nvswitch_interface_pg_rx_uc_frames接口接收优先级组单播帧计数器。
nvswitch_interface_pg_rx_mc_frames接口接收优先级组组播帧计数器。
nvswitch_interface_pg_rx_bc_frames接口接收优先级组广播帧计数器。
nvswitch_interface_pg_tx_octets接口接收优先级组传输字节计数器。
nvswitch_interface_pg_tx_uc_frames接口接收优先级组传输单播帧计数器。
nvswitch_interface_pg_tx_mc_frames接口接收优先级组传输组播帧计数器。
nvswitch_interface_pg_tx_bc_frames接口接收优先级组传输广播帧计数器。
nvswitch_interface_pg_tx_frames接口接收优先级组传输帧计数器。
nvswitch_interface_pg_rx_pause接口接收优先级组接收暂停计数器。
nvswitch_interface_pg_rx_pause_duration接口接收优先级组接收暂停持续时间计数器。
nvswitch_interface_pg_tx_pause接口接收优先级组传输暂停计数器。
nvswitch_interface_pg_tx_pause_duration接口接收优先级组传输暂停持续时间计数器。
nvswitch_interface_pg_rx_pause_transition接口接收优先级组接收暂停转换计数器。
nvswitch_interface_pg_rx_discard接口接收优先级组接收丢弃计数器。

当您配置 nv set system telemetry interfaces-stats switch-priority <priority> 命令时,交换机收集并导出以下额外的接口交换机优先级统计信息

名称描述
nvswitch_interface_sp_rx_bc_frames交换机优先级的接收广播计数器
nvswitch_interface_sp_rx_discard交换机优先级的接收丢弃计数器
nvswitch_interface_sp_rx_frames交换机优先级的接收帧计数器。
nvswitch_interface_sp_rx_mc_frames交换机优先级的接收组播帧计数器。
nvswitch_interface_sp_rx_octets交换机优先级的接收字节计数器。
nvswitch_interface_sp_rx_pause交换机优先级的接收暂停计数器。
nvswitch_interface_sp_rx_pause_duration交换机优先级的接收暂停持续时间计数器。
nvswitch_interface_sp_rx_pause_transition交换机优先级的接收暂停转换计数器。
nvswitch_interface_sp_rx_uc_frames交换机优先级的接收单播帧计数器。
nvswitch_interface_sp_tx_bc_frames交换机优先级的传输广播帧计数器。
nvswitch_interface_sp_tx_frames交换机优先级的传输帧计数器。
nvswitch_interface_sp_tx_mc_frames交换机优先级的传输组播帧计数器。
nvswitch_interface_sp_tx_octets交换机优先级的传输字节计数器。
nvswitch_interface_sp_tx_pause交换机优先级的传输暂停计数器。
nvswitch_interface_sp_tx_pause_duration交换机优先级的传输暂停持续时间。
nvswitch_interface_sp_tx_uc_frames交换机优先级的传输单播帧计数器。

当您配置 nv set system telemetry interface-stats class phy state enabled 命令时,交换机收集并导出以下额外的接口统计信息

名称描述
nvswitch_interface_time_since_last_clear自上次清除计数器事件以来的毫秒数。
nvswitch_interface_phy_received_bits接收到的流量总量(比特)。
nvswitch_interface_phy_symbol_errorsFEC 校正算法未校正的或 FEC 未激活时的错误比特。
nvswitch_interface_phy_effective_errors应用 FEC 后的错误数。
nvswitch_interface_phy_raw_errors在通道 0 到通道 7 上识别出的错误比特。当启用 FEC 时,此感应对应于已校正的错误。
nvswitch_interface_raw-berraw_ber_coef_laneX*10^(raw_ber_magnitude)

interface_oper_state 的 JSON 数据示例

interface_dot3_stats_fcs_errors 的 JSON 数据示例

缓冲区统计信息格式

当您配置 nv set system telemetry buffer-stats export state enable 命令时,交换机会收集并导出以下接口和交换机、缓冲区占用率和水位线统计信息

名称描述
nvswitch_interface_shared_buffer_port_pg_curr_occupancy当前缓冲区占用率。
nvswitch_interface_shared_buffer_port_pg_watermark最大缓冲区占用率。
nvswitch_interface_shared_buffer_port_pg_desc_curr_occupancy描述符的当前缓冲区占用率。
nvswitch_interface_shared_buffer_port_pg_desc_watermark描述符的最大缓冲区占用率。
nvswitch_interface_shared_buffer_port_pg_watermark_recorded_max自 sdk_stats 运行以来记录的最高最大缓冲区占用率。
nvswitch_interface_shared_buffer_port_pg_desc_watermark_recorded_max自 sdk_stats 运行以来记录的描述符的最高最大缓冲区占用率。
nvswitch_interface_shared_buffer_ingress_pool_curr_occupancy入口池的当前缓冲区占用率。
nvswitch_interface_shared_buffer_ingress_pool_watermark入口池的最大缓冲区占用率。
nvswitch_interface_shared_buffer_ingress_pool_desc_curr_occupancy入口池描述符的当前缓冲区占用率。
nvswitch_interface_shared_buffer_ingress_pool_desc_watermark入口池描述符的最大缓冲区占用率。
nvswitch_interface_shared_buffer_ingress_pool_watermark_recorded_max自 sdk_stats 运行以来记录的入口池最高最大缓冲区占用率。
nvswitch_interface_shared_buffer_ingress_pool_desc_watermark_recorded_max自 sdk_stats 运行以来记录的入口池描述符最高最大缓冲区占用率。
nvswitch_interface_shared_buffer_port_tc_curr_occupancy流量类别的当前缓冲区占用率。
nvswitch_interface_shared_buffer_port_tc_watermark流量类别的最大缓冲区占用率。
nvswitch_interface_shared_buffer_port_tc_desc_curr_occupancy描述符的当前缓冲区占用率。
nvswitch_interface_shared_buffer_port_tc_desc_watermark描述符的最大缓冲区占用率。
nvswitch_interface_shared_buffer_port_tc_watermark_recorded_max自 sdk_stats 运行以来记录的最高最大缓冲区占用率。
nvswitch_interface_shared_buffer_port_tc_desc_watermark_recorded_max自 sdk_stats 运行以来记录的 TC 描述符的最高最大缓冲区占用率。
nvswitch_interface_shared_buffer_egress_pool_curr_occupancy出口池的当前缓冲区占用率。
nvswitch_interface_shared_buffer_egress_pool_watermark出口池的最大缓冲区占用率。
nvswitch_interface_shared_buffer_egress_pool_desc_curr_occupancy出口池描述符的当前缓冲区占用率。
nvswitch_interface_shared_buffer_egress_pool_desc_watermark出口池描述符的最大缓冲区占用率。
nvswitch_interface_shared_buffer_egress_pool_watermark_recorded_max自 sdk_stats 运行以来记录的出口池最高最大缓冲区占用率。
nvswitch_interface_shared_buffer_egress_pool_desc_watermark_recorded_max自 sdk_stats 运行以来记录的池描述符的最高最大出口池缓冲区占用率。
nvswitch_interface_shared_buffer_mc_port_curr_occupancy组播端口的当前缓冲区占用率。
nvswitch_interface_shared_buffer_mc_port_watermark组播端口的最大缓冲区占用率。
nvswitch_interface_shared_buffer_mc_port_watermark_max自 sdk_stats 运行以来记录的组播端口的最高最大缓冲区占用率。
nvswitch_shared_buffer_mc_sp_curr_occupancy组播交换优先级的当前缓冲区占用率。
nvswitch_shared_buffer_mc_sp_watermark组播交换优先级的最大缓冲区占用率。
nvswitch_shared_buffer_mc_sp_watermark_max自 sdk_stats 运行以来记录的组播交换优先级的最高最大缓冲区占用率。
nvswitch_shared_buffer_pool_curr_occupancy当前池缓冲区占用率。
nvswitch_shared_buffer_pool_watermark最大池缓冲区占用率
nvswitch_shared_buffer_pool_watermark_max自 sdk_stats 运行以来记录的组播交换优先级的最高最大池缓冲区占用率。
nvswitch_interface_headroom_buffer_pg_curr_occupancy端口缓冲区的当前预留空间缓冲区占用率。
nvswitch_interface_headroom_buffer_pg_watermark端口缓冲区的最大池预留空间缓冲区占用率。
nvswitch_interface_headroom_buffer_pg_watermark_recorded_max自 sdk_stats 运行以来记录的端口缓冲区的最高最大预留空间缓冲区占用率。
nvswitch_interface_headroom_buffer_shared_curr_occupancy端口共享缓冲区的当前预留空间缓冲区占用率。
nvswitch_interface_headroom_shared_buffer_shared_watermark端口共享缓冲区的最大预留空间缓冲区占用率。
nvswitch_interface_headroom_shared_buffer_shared_watermark_recorded_max自 sdk_stats 运行以来记录的端口共享缓冲区的最高最大预留空间缓冲区占用率。
nvswitch_interface_headroom_buffer_shared_pool_curr_occupancy端口共享池缓冲区的当前预留空间缓冲区占用率
nvswitch_interface_headroom_shared_buffer_shared_pool_watermark端口共享池缓冲区的最大预留空间缓冲区占用率。
nvswitch_interface_headroom_shared_buffer_shared_pool_watermark_recorded_max端口共享池缓冲区的最高最大预留空间缓冲区占用率。

控制平面统计信息格式

当您启用控制平面统计信息遥测时,交换机将导出以下统计信息

名称描述
nvswitch_control_plane_tx_packets控制平面发送数据包。
nvswitch_control_plane_tx_bytes控制平面发送字节。
nvswitch_control_plane_rx_packets控制平面接收数据包。
nvswitch_control_plane_rx_bytes控制平面接收字节。
nvswitch_control_plane_rx_buffer_drops控制平面接收缓冲区丢弃。
nvswitch_control_plane_trap_rx_packets控制平面陷阱组接收数据包。
nvswitch_control_plane_trap_rx_event_count控制平面陷阱组接收事件。
nvswitch_control_plane_trap_rx_drop控制平面陷阱组接收丢弃。
nvswitch_control_plane_trap_rx_bytes控制平面陷阱组接收字节。
nvswitch_control_plane_trap_group_rx_packets控制平面陷阱组接收数据包。
nvswitch_control_plane_trap_group_rx_bytes控制平面陷阱组接收字节。
nvswitch_control_plane_trap_group_pkt_violations控制平面陷阱组数据包违规。
nvswitch_control_plane_trap_rx_drop 的 JSON 数据示例

平台统计信息格式

当您全局启用平台统计信息遥测,或者当您为单个组件启用遥测时,交换机将导出以下统计信息

CPU 统计信息包括 CPU 核心数和操作模式(用户、系统、空闲、iowait、irq、softirq、steal、guest、guest_nice)。

名称描述
node_cpu_core_throttles_totalCPU 核心被节流的总次数。
node_cpu_frequency_max_hertzCPU 线程的最大频率(赫兹)。
node_cpu_frequency_min_hertzCPU 线程的最小频率(赫兹)。
node_cpu_guest_seconds_totalCPU 在每种模式下用于 guest 的秒数。
node_cpu_package_throttles_totalCPU 封装被节流的总次数。
node_cpu_scaling_frequency_hertz当前缩放的 CPU 线程频率(赫兹)。
node_cpu_scaling_frequency_max_hertz最大缩放的 CPU 线程频率(赫兹)。
node_cpu_scaling_frequency_min_hertz最小缩放的 CPU 线程频率(赫兹)。
node_cpu_seconds_totalCPU 在每种模式下花费的秒数。
名称描述
node_disk_ata_rotation_rate_rpmATA 磁盘旋转速率,单位为 RPM。(SSD 为 0)。
node_disk_ata_write_cacheATA 磁盘写入缓存是否存在。
node_disk_ata_write_cache_enabledATA 磁盘写入缓存状态(启用或禁用)。
node_disk_discard_time_seconds_total所有 discard 操作花费的总秒数。
node_disk_discarded_sectors_total成功 discard 的扇区总数。
node_disk_discards_completed_total完成的 discard 操作总数。
node_disk_discards_merged_total合并的 discard 操作总数。
node_disk_flush_requests_time_seconds_total所有 flush 请求花费的总秒数。
node_disk_flush_requests_total成功完成的 flush 请求总数。
node_disk_info来自 /sys/block/<block_device> 的磁盘信息。
node_disk_io_now正在进行的 I/O 操作数。
node_disk_io_time_seconds_totalI/O 期间花费的总秒数。
node_disk_io_time_weighted_seconds_totalI/O 期间花费的加权秒数。
node_disk_read_bytes_total成功读取的字节总数。
node_disk_read_time_seconds_total所有读取操作花费的总秒数。
node_disk_reads_completed_total成功完成的读取操作总数。
node_disk_reads_merged_total合并的读取操作总数。
node_disk_write_time_seconds_total所有写入操作花费的总秒数。
node_disk_writes_completed_total成功完成的写入操作总数。
node_disk_writes_merged_total合并的写入操作数。
node_disk_written_bytes_total成功写入的字节总数。
名称描述
node_filesystem_avail_bytes文件系统中非 root 用户可用的空间(字节)。
node_filesystem_device_error获取给定设备的统计信息时是否发生错误。
node_filesystem_files文件系统文件节点总数。
node_filesystem_files_free文件系统可用文件节点总数。
node_filesystem_free_bytes文件系统可用空间(字节)。
node_filesystem_readonly文件系统只读状态。
node_filesystem_size_bytes文件系统大小(字节)。
名称描述
node_memory_Active_anon_bytes/proc/meminfo Active_anon 字节。
node_memory_Active_bytes/proc/meminfo Active 字节。
node_memory_Active_file_bytes/proc/meminfo Active_file 字节。
node_memory_AnonHugePages_bytes/proc/meminfo AnonHugePages 字节。
node_memory_AnonPages_bytes/proc/meminfo AnonPages 字节。
node_memory_Bounce_bytes/proc/meminfo Bounce 字节。
node_memory_Buffers_bytes /proc/meminfo Buffers 字节。
node_memory_Cached_bytes/proc/meminfo Cached 字节。
node_memory_CommitLimit_bytes/proc/meminfo CommitLimit 字节。
node_memory_Committed_AS_bytes/proc/meminfo Committed_AS 字节。
node_memory_DirectMap1G_bytes/proc/meminfo DirectMap1G 字节。
node_memory_DirectMap2M_bytes/proc/meminfo DirectMap2M 字节。
node_memory_DirectMap4k_bytes/proc/meminfo DirectMap4k 字节。
node_memory_Dirty_bytes/proc/meminfo Dirty 字节。
node_memory_FileHugePages_bytes/proc/meminfo FileHugePages 字节。
node_memory_FilePmdMapped_bytes/proc/meminfo FilePmdMapped 字节。
node_memory_HardwareCorrupted_bytes/proc/meminfo HardwareCorrupted 字节。
node_memory_HugePages_Free/proc/meminfo HugePages_Free。
node_memory_HugePages_Rsvd/proc/meminfo HugePages_Rsvd。
node_memory_HugePages_Surp/proc/meminfo HugePages_Surp。
node_memory_HugePages_Total/proc/meminfo HugePages_Total。
node_memory_Hugepagesize_bytes/proc/meminfo Hugepagesize 字节。
node_memory_Hugetlb_bytes/proc/meminfo Hugetlb 字节。
node_memory_Inactive_anon_bytes/proc/meminfo Inactive_anon 字节。
node_memory_Inactive_bytes/proc/meminfo Inactive 字节。
node_memory_Inactive_file_bytes/proc/meminfo Inactive_file 字节。
node_memory_KReclaimable_bytes/proc/meminfo KReclaimable 字节。
node_memory_KernelStack_bytes/proc/meminfo KernelStack 字节。
node_memory_Mapped_bytes/proc/meminfo Mapped 字节。
node_memory_MemAvailable_bytes/proc/meminfo MemAvailable 字节。
node_memory_MemFree_bytes/proc/meminfo MemFree 字节。
node_memory_MemTotal_bytes/proc/meminfo MemTotal 字节。
node_memory_Mlocked_bytes/proc/meminfo Mlocked 字节。
node_memory_NFS_Unstable_bytes/proc/meminfo NFS_Unstable 字节。
node_memory_PageTables_bytes/proc/meminfo PageTables 字节。
node_memory_Percpu_bytes/proc/meminfo Percpu 字节。
node_memory_SReclaimable_bytes/proc/meminfo SReclaimable 字节。
node_memory_SUnreclaim_bytes/proc/meminfo SUnreclaim 字节。
node_memory_SecPageTables_bytes/proc/meminfo SecPageTables 字节。
node_memory_ShmemHugePages_bytes/proc/meminfo ShmemHugePages 字节。
node_memory_ShmemPmdMapped_bytes/proc/meminfo ShmemPmdMapped 字节。
node_memory_Shmem_bytes/proc/meminfo Shmem 字节。
node_memory_Slab_bytes/proc/meminfo Slab 字节。
node_memory_SwapCached_bytes/proc/meminfo SwapCached 字节。
node_memory_SwapFree_bytes/proc/meminfo SwapFree 字节。
node_memory_SwapTotal_bytes/proc/meminfo SwapTotal 字节。
node_memory_Unevictable_bytes/proc/meminfo Unevictable 字节。
node_memory_VmallocChunk_bytes/proc/meminfo VmallocChunk 字节。
node_memory_VmallocTotal_bytes/proc/meminfo VmallocTotal 字节。
node_memory_VmallocUsed_bytes/proc/meminfo VmallocUsed 字节。
node_memory_WritebackTmp_bytes/proc/meminfo WritebackTmp 字节。
node_memory_Writeback_bytes/proc/meminfo Writeback 字节。
node_memory_Zswap_bytes/proc/meminfo Zswap 字节。
node_memory_Zswapped_bytes/proc/meminfo Zswapped 字节。
名称描述
nvswitch_env_fan_cur_speed当前风扇速度(RPM)。
nvswitch_env_fan_dir风扇方向(0:前到后,1:后到前)。
nvswitch_env_fan_max_speed风扇最大速度(RPM)。
nvswitch_env_fan_min_speed风扇最小速度(RPM)。
nvswitch_env_fan_state风扇状态(0:不存在,1:正常,2:失败,3:不良)。
nvswitch_env_psu_capacityPSU 容量(瓦特)。
nvswitch_env_psu_currentPSU 电流(安培)。
nvswitch_env_psu_powerPSU 功率(瓦特)。
nvswitch_env_psu_statePSU 状态(0:不存在,1:正常,2:失败,3:不良)。
nvswitch_env_psu_voltagePSU 电压(伏特)。
nvswitch_env_temp_crit临界温度阈值(摄氏度)。
nvswitch_env_temp_current当前温度(摄氏度)。
nvswitch_env_temp_max最高温度阈值(摄氏度)。
nvswitch_env_temp_min最低温度阈值(摄氏度)。
nvswitch_env_temp_state温度传感器状态(0:不存在,1:正常,2:失败,3:不良)。
PSU 和温度传感器遥测的 JSON 数据示例

路由指标格式

当您启用第 3 层路由指标遥测时,交换机将导出以下统计信息

名称描述
nvrouting_bgp_peer_stateBGP 对等体状态:EstablishedIdleConnectActiveOpenSent
nvrouting_bgp_peer_fsm_established_transitions对等会话 BGP 对等体状态转换为 Established 状态的次数。
nvrouting_bgp_peer_rib_adj_in_ipv4_unicast从 BGP 邻居接收的 IPv4 单播路由数,应用任何策略之后。此计数是邻居的策略后 Adj-RIB-In 中存在的路由数。
nvrouting_bgp_peer_rib_adj_in_ipv6_unicast从 BGP 邻居接收的 IPv6 单播路由数,应用任何策略之后。此计数是邻居的策略后 Adj-RIB-In 中存在的路由数。
nvrouting_bgp_peer_rib_adj_in_l2vpn_evpn从 BGP 邻居接收的 EVPN 路由数,应用任何策略之后。此计数是邻居的策略后 Adj-RIB-In 中存在的路由数。
nvrouting_bgp_peer_socket_in_queue要从 BGP 邻居接收的消息数(已排队)。
nvrouting_bgp_peer_socket_out_queue要发送到 BGP 邻居的消息数(已排队)。
nvrouting_bgp_peer_rx_updates从邻居接收的 BGP 消息数。
nvrouting_bgp_peer_tx_updates发送到邻居的 BGP 消息数。
nvrouting_rib_count每个路由源的 IP 路由表中的路由数。
nvrouting_rib_count_ipv6跟踪每个路由源的 IPv6 RIB 路由计数。
nvrouting_rib_count_connected跟踪 IPv4 RIB 连接路由总数。
nvrouting_rib_count_bgp跟踪 IPv4 RIB BGP 路由总数。
nvrouting_rib_count_kernel跟踪 IPv4 RIB 内核路由总数。
nvrouting_rib_count_static跟踪 IPv4 RIB 静态路由总数。
nvrouting_rib_count_pbr跟踪 IPv4 RIB PBR 路由总数。
nvrouting_rib_count_ospf跟踪 IPv4 RIB OSPF 路由总数。
nvrouting_rib_count_connected_ipv6跟踪 IPv6 RIB 连接路由总数。
nvrouting_rib_count_bgp_ipv6跟踪 IPv6 RIB BGP 路由总数。
nvrouting_rib_count_kernel_ipv6跟踪 IPv6 RIB 内核路由总数。
nvrouting_rib_count_static_ipv6跟踪 IPv6 RIB 静态路由总数。
nvrouting_rib_count_pbr_ipv6跟踪 IPv6 RIB PBR 路由总数。
nvrouting_rib_count_ospf_ipv6跟踪 IPv6 RIB OSPF 路由总数。

BGP 对等体指标的 JSON 数据示例

RIB 计数指标的 JSON 数据示例

直方图数据格式

交换机导出到 OTEL 收集器的直方图数据样本是直方图数据点,其中包括直方图桶(箱)计数和每个桶的相应队列长度大小边界。如果配置了延迟和计数器直方图数据,也会导出。

如果在采样间隔期间流量类别中没有传输任何数据包,则延迟直方图桶计数不会在导出的遥测数据中递增。

对于每个已启用入口和出口缓冲区、延迟和计数器直方图收集的接口,交换机都会发送一个包含以下名称的样本

名称描述
nvswitch_histogram_interface_egress_buffer直方图接口出口缓冲区队列深度。
nvswitch_histogram_interface_ingress_buffer直方图接口入口缓冲区队列深度。
nvswitch_histogram_interface_counter直方图接口计数器数据。
nvswitch_histogram_interface_latency直方图接口延迟数据。

interface_ingress_buffer 的 JSON 数据示例

interface_egress_buffer 的 JSON 数据示例

interface_counter 的 JSON 数据示例

interface_latency 的 JSON 数据示例

静态标签格式

设备静态标签在 OTLP 数据的资源指标部分中导出

静态设备标签的 JSON 数据示例

接口静态标签作为每个接口的指标属性导出。

静态接口标签的 JSON 数据示例

显示遥测健康指标

要显示遥测健康信息,请运行 nv show system telemetry health 命令

cumulus@switch:~$ nv show system telemetry health
                                     operational
---------------------------          -----------
service-status    
  nv-telemtry-service                active                      
  platform-stats-service             active
  histogram-export-service           active
  sdk-stats-service                  active
  routing-telemtry-service           inactive
internal-metrics 
  process 
    cpu-seconds                      3020
    memory-rss-kilobytes             182812672
    runtime-heap-alloc-bytes         28617960
    runtime-total-alloc-bytes        915541979208
    runtime-total-sys-memory-bytes   151368752
    uptime-seconds                   65313
[receivers]                          otlp/global
[receivers]                          prometheus/global
processors
  [memory-limiter]                   memory_limiter/1
  [batch]                            batch/1
[exporters]                          otlp/global

Export Destination Status
=======================
    Destination         Connectivity          Export Counter       Drop Counter
    -----------         ------------          --------------       ------------
    11.0.10.2:4317      Pass                  51534586             7087

Cumulus Linux Open Telemetry 还提供由收集器公开的一组内部指标,以监控其性能和行为。这些指标对于了解收集器的健康状况和效率至关重要。

要显示有关遥测健康内部指标的信息,请运行 nv show system telemetry health internal-metrics 命令

cumulus@switch:~$ nv show system telemetry health internal-metrics
                                     operational
------------------------             -----------
process        
  cpu-seconds                        029
  memory-rss-kilobytes               182812672
  runtime-heap-alloc-bytes           28617960
  runtime-total-alloc-bytes          915541979208
  runtime-total-sys-memory-bytes     151368752
  uptime-seconds                     65313
[receivers]                          otlp/global
[receivers]                          prometheus/global
processors
  [memory-limiter]                   memory_limiter/1
  [batch]                            batch/1
[exporters]                          otlp/global

要显示有关遥测健康内部指标进程的信息,请运行 nv show system telemetry health internal-metrics process 命令

cumulus@switch:~$ nv show system telemetry health internal-metrics process
                                   operational
------------------------           -----------
cpu-seconds                        029
memory-rss-kilobytes               182812672
runtime-heap-alloc-bytes           28617960
runtime-total-alloc-bytes          915541979208
runtime-total-sys-memory-bytes     151368752
uptime-seconds                     65313

要显示有关遥测健康内部指标接收器的信息,请运行 nv show system telemetry health internal-metrics receivers 命令

cumulus@switch:~$ nv show system telemetry health internal-metrics receivers
Receivers            Accepted Metric Points      Refused Metric Points
---------            ----------------------      ---------------------
otlp/global          4967144                     0
prometheus/global    46989135                    0

要显示有关遥测健康内部指标处理器器的信息,请运行 nv show system telemetry health internal-metrics processors 命令

cumulus@switch:~$ nv show system telemetry health internal-metrics processors
  Memory-limiter
  ==============
    memory_limiter/1
     Accepted Metric Points: 25002370
     Dropped Metric Points: 0
     Inserted Metric Points: 0
     Refused Metric Points: 0

  Batch Processor
  ===============
    batch/1
     Batch Send Size Bucket 10: 828620
     Batch Send Size Bucket 25: 828620
     Batch Send Size Bucket 50: 828620
     Batch Send Size Bucket 75: 828620
     Batch Send Size Bucket 100: 828620
...

要显示有关遥测健康内部指标导出器的信息,请运行 nv show system telemetry health internal-metrics exporters 命令

cumulus@switch:~$ nv show system telemetry health internal-metrics exporters
Exporters       Enqueue Failed Metric Points   Queue Capacity   Queue Size   Send Failed Metric Points   Sent Metric Points
---------       ----------------------------   --------------   ----------   -------------------------   ------------------
otlp/global     0                              1000             0            7087                        52000844