流式遥测:gNMI、OpenConfig、gRPC

SNMP polling at 60-second intervals misses microbursts and loads the control plane. OcNOS streams model-driven telemetry over gRPC instead: OpenConfig-modelled paths, on-change or sampled, to a collector that dials in or that the router dials out to, feeding Prometheus, InfluxDB, and Grafana without a translation layer.

遥测数据管道

OcNOS 路由器将 gNMI Subscribe 负载(gRPC dial-out)上报至中央采集器。采集器解复用至时序与搜索后端,Grafana 在其之上渲染仪表盘。

流式遥测拓扑:OcNOS 路由器通过 gNMI dial-out 将数据流式上送至采集器,再分发至 Prometheus、InfluxDB 和 Grafana
流式遥测:OcNOS 通过 gNMI dial-out 上送至采集器,再分发至 Prometheus、InfluxDB 和 Grafana。

为什么流式遥测取代了 SNMP

SNMP 轮询周期会错过微突发、重压控制平面,且无法提供结构化、模型驱动的负载数据。 gNMI Subscribe 基于 gRPC 的方式颠覆了原有模型:设备在状态变化时或按采样间隔主动推送类型化更新,采集器只需解析 protobuf 即可。OcNOS 完整开放了 OpenConfig tree plus IETF 与 IP Infusion 原生模型,并同时支持 dial-in(采集器连接到设备)和 dial-out(设备从 NAT 后连接到采集器)两种部署模式。

OcNOS 的流式遥测实现

gNMI Subscribe

Stream, once, and poll

Subscribe RPC in stream, once, and poll modes. Sampled streaming since OcNOS 6.5.1, on-change streaming since 7.0.0, so a collector can take a periodic feed or only the deltas.

YANG 模型

OpenConfig + IETF + 原生

OpenConfig interfaces、network-instance、BGP 及 platform 模型;已批准的 IETF YANG;以及面向 OcNOS 特有状态的原生模型。所有模型均经版本管理并对外发布。

Dial-out 模式

NAT 后路由器

gRPC dial-out 让位于 NAT 之后的基站侧与边缘路由器将遥测数据推送至中央采集器,无需开放任何入站端口。

传感器覆盖范围

Path-addressed state

Interface counters, routing state, and platform health are addressed by YANG path. Wild-card keys in the sensor path (since 6.6.0) select every interface or neighbour in one subscription.

Encoding

JSON_IETF + Protobuf

同时支持 JSON_IETF 与 protobuf 编码。在高扇出传感器场景下 protobuf 在传输效率上更优;JSON 则在可调试性上更胜一筹。

采集器集成

Telegraf + gNMIc

gNMI is an open specification, so standard collectors such as the Telegraf gNMI input and gNMIc consume the OcNOS stream and hand it to Prometheus, InfluxDB, and Grafana.

The gNMI RPC surface in OcNOS

gNMI is a small gRPC service with four RPCs: Capabilities, Get, Set, and Subscribe. Telemetry is the Subscribe RPC. The table lists what OcNOS implements and the release that introduced it, as recorded in the Feature Matrix.

Since OcNOS 6.4.1

Subscribe, dial-in

The collector opens the gRPC session to the router over IPv4 or IPv6 and subscribes to paths. gNMI specification 0.10.0.

Since OcNOS 6.5.1

Subscribe, dial-out

The router opens the session to the collector through a gRPC tunnel, so routers behind NAT or a firewall need no inbound port.

Since OcNOS 6.5.1

Once and poll modes

A one-shot snapshot of the subscribed paths, or a subscription the collector polls on its own schedule, alongside continuous streaming.

Since OcNOS 7.0.0

On-change streaming

Updates only when a value changes, for state such as interface operational status, BGP session state, and route counts.

Since OcNOS 6.6.0

Get RPC and wild-card paths

Point reads through gNMI Get, and wild-card keys in the sensor path so one subscription covers every interface or every neighbour.

Since OcNOS 6.6.0

TLS, authentication, in-band

TLS on the gRPC session, user authentication on the gNMI server (since 7.0.0), and in-band operation in one or several VRFs.

Since OcNOS 6.5.1

OpenConfig models

OpenConfig data models over gNMI, with OpenConfig support in the NETCONF path since 6.0.0, so the same model tree serves configuration and telemetry.

OcNOS 遥测能为你带来什么

  • 符合标准的路径。 OpenConfig leaf 路径与您现有采集器的预期完全匹配,无需任何专有 YANG 转换层。
  • Change-driven visibility. On-change subscriptions report a state transition when it happens, not at the next poll, and sampled subscriptions run at the interval the collector asks for.
  • Open collector stack. Standard gNMI collectors, Prometheus, InfluxDB, and Grafana work as they do for any other gNMI source.
  • 统一的配置界面。 同一个 gNMI 服务器同时支持 Get、Set 和 Subscribe:遥测与配置即代码共用一套认证和 TLS 路径。

正在升级你的可观测性栈?

申请技术演示 →
常见问题

常见问题

streaming telemetry 与 SNMP 有何区别?
SNMP 以固定周期轮询设备,在给控制平面加载负担的同时还可能漏掉微突发。借助 gNMI 流式遥测,设备会在发生变化时或按采样间隔推送结构化、模型驱动的更新,收集器只需解析有效载荷即可。
OcNOS 支持哪些 gNMI 订阅模式?
OcNOS supports the gNMI Subscribe RPC in stream, once, and poll modes, with sample-interval streaming since OcNOS 6.5.1 and on-change streaming since 7.0.0, over dial-in (the collector connects to the router, since 6.4.1) and dial-out (the router connects to the collector, since 6.5.1).
OcNOS 能否从位于 NAT 之后的路由器流式传输遥测数据?
是。gRPC dial-out 使位于 NAT 之后的基站站点与 edge 路由器无需开放任何入站端口即可将遥测数据推送至中央采集器。OcNOS 也支持由采集器主动连接设备的 dial-in 方式。
What data can gNMI stream from OcNOS?
Any state the OpenConfig and native YANG models expose, addressed by path. Wild-card keys in the sensor path select whole tables at once, such as every interface or every BGP neighbour, and the sample interval is set per subscription.
Which collectors work with OcNOS telemetry?
gNMI is an open specification, so any standard gNMI collector consumes the OcNOS stream: the Telegraf gNMI input, gNMIc, and the collectors built into observability platforms. From there the data lands in Prometheus, InfluxDB, or Grafana like any other time series.