This repo contains Python scripts, HTML/Grafana templates and SQL DDL for CiscoLive NOC collectors and dashboards.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
This project is a collection of Python script, database DDL files, Grafana dashboard templates, etc. that are used in the CiscoLive Network Operations Center (NOC). These programs are inventory and metrics collectors and dashboard creators. The technologies span wireless (Catalyst and Meraki), WAN (ASR1009-X), LAN (Cat3560-CG, 7K, 9K and Nexus 9K), and basic availability monitoring.
The following dashboards are part of this project:
This project is being released in phases, so check back often to see what additional components have been released. Most recently the separate 'SSH2Influx' project was released on Cisco DevNet Code Exchange and Github.
Additionally the Devnet Dashboards - Converged Availability Monitor was updated and released end of June 2023.
To get a local copy up and running follow these example steps.
Generally a Python 3.10 environment is needed. It is helpful to use a virtual environment (venv) for separation from your main environment. Ubuntu 22.04 LTS (Jammy Jellyfish) has been used for a few major events and is Long-Term Support.
Installing Python 3.10 is outside the scope of this repo, but this is a good reference:
Ubuntu 22.04 LTS Install from Ubuntu.com
Our installs were 4 vCPU with 16 GB vRAM and 100 GB vDisk.
git clone https://github.com/jasoncdavis/CiscoLiveNOC23US.git
cd CiscoLiveNOC23US python3 -m venv .venv source .venv/bin/activate # Note the mysql client installation requires additional steps, follow this link # https://pypi.org/project/mysqlclient/ pip install -r requirements.txt
cp example-optionsconfig.yaml optionsconfig.yaml vi optionsconfig.yaml
There are SEVERAL collectors and scripts that are necessary to run, depending on your needs.
The Availability Monitoring tasks are handled through the DevNet Dashboard - Converged Availability Monitoring (DD-CAM) project. This is under a separate repo.
https://github.com/jasoncdavis/DD-CAM
Follow the guidance in that repo to install and configure.
WAN Monitoring is a mix of streaming telemetry, polled NETCONF RPCs and CLI information gathering (with SSH2Influx). The following configuration template is used for our IOS-XR based WAN edge routers (Cisco ASR1009-Xs).
telemetry ietf subscription 101
encoding encode-kvgpb
filter xpath /process-cpu-ios-xe-oper:cpu-usage/cpu-utilization
source-address CHANGEME_SOURCE_IP
stream yang-push
update-policy periodic 2000
receiver ip address CHANGEME_TELEGRAF_IP 57500 protocol grpc-tcp
telemetry ietf subscription 102
encoding encode-kvgpb
filter xpath /memory-ios-xe-oper:memory-statistics/memory-statistic
source-address CHANGEME_SOURCE_IP
stream yang-push
update-policy periodic 2000
receiver ip address CHANGEME_TELEGRAF_IP 57500 protocol grpc-tcp
telemetry ietf subscription 104
encoding encode-kvgpb
filter xpath /ospf-ios-xe-oper:ospf-oper-data/ospfv2-instance/ospfv2-area/ospfv2-interface/ospfv2-neighbor
source-address CHANGEME_SOURCE_IP
stream yang-push
update-policy periodic 60000
receiver ip address CHANGEME_TELEGRAF_IP 57500 protocol grpc-tcp
telemetry ietf subscription 105
encoding encode-kvgpb
filter xpath /bgp-ios-xe-oper:bgp-state-data/address-families/address-family/bgp-neighbor-summaries/bgp-neighbor-summary
source-address CHANGEME_SOURCE_IP
stream yang-push
update-policy periodic 60000
receiver ip address CHANGEME_TELEGRAF_IP 57500 protocol grpc-tcp
netconf-yang
netconf-yang ssh ipv4 access-list name HTTP_FILTER
netconf-yang ssh ipv6 access-list name IPV6_FILTER
restconf
restconf ipv4 access-list name HTTP_FILTER
restconf ipv6 access-list name IPV6_FILTER
The Telegraf server needs the telegraf.conf file update to include:
[[inputs.cisco_telemetry_mdt]]
transport = "grpc"
service_address = ":57000"
and an output section:
[[outputs.influxdb]]
database = "telegraf"
urls = [ "http://127.0.0.1:8086" ]
username = "telegraf"
password = "CHANGEME"
The InfluxDB server (we put them together into a combined TIG server) must be configured to receive the Telegraf gRPC telemetry into a new database. Access the 'influx' CLI utility and issue the commands:
create database telegraf
create user telegraf with password 'CHANGEME'
There are various Grafana dashboard JSON definition files in the dashboards directory. Specifically for WAN, we'll want to import the following:
The following WAN scripts should be run:
cd CiscoLiveNOC23US source .venv/bin/activate tmux new -s WAN-interface python -m WAN.NETCONFrpc-getInterfaceData [CTRL-b + d] # detaches from tmux tmux new -s WAN-transceiver python -m WAN.SSHget-transceiverpower.py [CTRL-b + d] # detaches from tmux
LAN Switching encompasses Core, Distribution, and Access with DC Nexus switching.
The following WAN scripts should be run:
cd CiscoLiveNOC23US source .venv/bin/activate tmux new -s LAN-NETCONFrpc-getSwitchHealth python -m LAN.NETCONFrpc-getSwitchHealth [CTRL-b + d] # detaches from tmux tmux new -s LAN-WIFI-DIST-every5min python SSH2Influx.py -p LAN/WIFI-DIST-every5min.yml -t 1 [CTRL-b + d] # detaches from tmux tmux new -s LAN-DIST-every5min python SSH2Influx.py -p LAN/DIST-every5min.yml [CTRL-b + d] # detaches from tmux
Wireless monitoring includes NETCONF and SSH collectors against WLCs using InfluxDB and Grafana dashboards, along with custom generated dashboards.
The following WAN scripts should be run:
cd CiscoLiveNOC23US source .venv/bin/activate tmux new -s WIFI-PutWirelessDataIntoDB python -m wireless.PutWirelessDataIntoDB [CTRL-b + d] # detaches from tmux tmux new -s WIFI-SSH2Influx-WLC-rmi-every1min python SSH2Influx.py -p wireless/WLC-rmi-every1min.yml -f 60 [CTRL-b + d] # detaches from tmux tmux new -s WIFI-SSH2Influx-WLC-every2min python SSH2Influx.py -p wireless/WLC-every2min.yml -f 120 [CTRL-b + d] # detaches from tmux tmux new -s WIFI-createWirelessClientDashboards python -m wireless.createWirelessClientDashboards [CTRL-b + d] # detaches from tmux tmux new -s WIFI-createWirelessChannelUtilDashboards python -m wireless.createWirelessChannelUtilDashboards [CTRL-b + d] # detaches from tmux
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the Cisco Sample Code License. See LICENSE.md for more information.
Jason Davis - @SNMPguy - jadavis@cisco.com
Project Link: https://github.com/jasoncdavis/CiscoLiveNOC23US
Owner
Contributors
Categories
ObservabilityNetworkingData CenterProducts
IOS XENX-OSMerakiCatalyst SwitchesProgramming Languages
PythonLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community