流式遙測: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 在其之上渲染儀錶盤。

為什麼流式遙測取代了 SNMP
SNMP 輪詢周期會錯過微突發、重壓控制平面,且無法提供結構化、模型驅動的負載數據。 gNMI Subscribe 基於 gRPC 的方式顛覆了原有模型:設備在狀態變化時或按採樣間隔主動推送類型化更新,採集器只需解析 protobuf 即可。OcNOS 完整開放了 OpenConfig tree plus IETF 與 IP Infusion 原生模型,並同時支持 dial-in(採集器連接到設備)和 dial-out(設備從 NAT 後連接到採集器)兩種部署模式。
OcNOS 的流式遙測實現
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.
OpenConfig + IETF + 原生
OpenConfig interfaces、network-instance、BGP 及 platform 模型;已批准的 IETF YANG;以及適用於 OcNOS 特有狀態的原生模型。所有模型均經版本管理並對外發布。
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.
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.
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.
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.
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.
On-change streaming
Updates only when a value changes, for state such as interface operational status, BGP session state, and route counts.
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.
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.
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 有何區別?
OcNOS 支援哪些 gNMI 訂閱模式?
OcNOS 能否從位於 NAT 之後的路由器串流傳輸遙測資料?
What data can gNMI stream from OcNOS?
Which collectors work with OcNOS telemetry?
深入了解,隨身帶走。
兩份簡明的技術下載資料,內容比本頁更為深入:完整的 OcNOS-SP 規格書與完整的 OcNOS-DC 規格書。