Skip to main content

ANX-a tool to test telemetry

·2 mins
Telemetry
Rory
Author
Rory
Step by step the ladder is ascended
Table of Contents
telemetry - This article is part of a series.
Part 2: This Article

ANX(Advanced NETCONF Explorer) 是一个 cisco 开源软件, 发布如下 github 上,能帮助我们快速的查找一些 sensor path, 做一些 telemetry 的实验, 具体的安装步骤可参考 github 主页。

https://github.com/cisco-ie/anx

安装
#

[root@xuxing239 ~]# git clone https://github.com/cisco-ie/anx
[root@xuxing239 ~]# cd anx/
[root@xuxing239 anx]# docker build -t netconf-explorer .
[root@xuxing239 anx]# docker run --name netconf-exlorer -d -p 9269:8080 netconf-explorer
[root@xuxing239 anx]# docker ps
CONTAINER ID   IMAGE              COMMAND                  CREATED      STATUS      PORTS                    NAMES
34cd21044420   netconf-explorer   "/usr/share/jetty9/b…"   3 days ago   Up 3 days   0.0.0.0:9269->8080/tcp   netconf-exlorer
[root@xuxing239 anx]#

安装完成后浏览器访问 server 的 9269 端口即可。

连接设备
#

这里使用 IOS XR 设备做演示, 首先 IOS XR 设备上需要配置相应的 ssh netconf 配置, 使用 ssh 用户名密码登录 IOS XR 设备。

NCS5501:
ssh server v2
ssh server netconf vrf default
RP/0/RP0/CPU0:R2-5501#show run netconf-yang agent
Thu Oct 31 04:24:33.798 UTC
netconf-yang agent
 ssh
RP/0/RP0/CPU0:R2-5501#show run netconf
Thu Oct 31 04:24:22.880 UTC
netconf agent tty

如何快速获得 sensor path
#

如下, 采取关键字搜索:

如何快速的 get 到该 sensor path 下的数据呢,我们需要使用 NETCONF console 的工具:

Telemetry 其他测试
#

Telemetry 分为两种模式 Dial-Out/Dial-In, 之前文章 Telemetry simple configuration in Cisco XR devices 介绍了 Dial-Out 的模式, 设备按一定的频率 pull 数据到 server, 以下是一个 Dial-in 的配置案例:(server 只去订阅自己感兴趣的数据)

RP/0/RP0/CPU0:NCS5516-B#show run telemetry model-driven
telemetry model-driven
 sensor-group cpu
  sensor-path Cisco-IOS-XR-wdsysmon-fd-oper:system-monitoring/cpu-utilization
 !
RP/0/RP0/CPU0:NCS5516-B#show run grpc
grpc
 port 57999
 no-tls
!

当你订阅 cpu 相关信息后, ANX 会自动往路由推送如下配置, 该配置会在你关闭采集窗口后自动 remove 掉。

RP/0/RP0/CPU0:NCS5516-B#show configuration commit changes last 1
Building configuration...
!! IOS XR Configuration 7.0.2
grpc
!
telemetry model-driven
 subscription anx-1617013486397
  sensor-group-id cpu sample-interval 15000
 !
!
end

Refe:

https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k-r6-5/telemetry/configuration/guide/b-telemetry-cg-asr9000-65x/b-telemetry-cg-asr9000-65x_chapter_010.html#id_36262
BRKSPG-2503

telemetry - This article is part of a series.
Part 2: This Article



Comments