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
如下, 采取关键字搜索:
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
Tags: Telemetry
No comments
Comments feed for this article
Trackback link: http://imxing.cn/wp-trackback.php?p=1088