Contributors
Forks
Stargazers
Issues
MIT License
LinkedIn

CiscoLive NOC 2023

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

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot

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:

noc_dashboards_animated

(back to top)

Built With

  • Python
  • HTML
  • CSS
  • MySQL
  • Influx
  • Grafana

(back to top)

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.

Getting Started

To get a local copy up and running follow these example steps.

Prerequisites

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.

Installation

  1. Clone the repo
    git clone https://github.com/jasoncdavis/CiscoLiveNOC23US.git
  2. Install project dependencies from the Python Package Index (PyPi) repo
    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
  3. Create an environment-specific optionalconfig.yaml file and replace the CHANGEME parameters with your IP addresses, hostnames, usernames, passwords, etc.
    cp example-optionsconfig.yaml optionsconfig.yaml
    vi optionsconfig.yaml
  4. Create a Telegraf, InfluxDB and Grafana (TIG) server to receive streaming telemetry, injected metrics from the Python scripts of this project, and display the dashboards. Ensure the TIG server specs (IP Address, hostname, API keys, etc) are properly defined in the optionsconfig.yaml file.

(back to top)

Usage

There are SEVERAL collectors and scripts that are necessary to run, depending on your needs.

Availability Monitoring

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

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 Monitoring

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

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

(back to top)

Roadmap

  • Provide Docker container option
  • Feature 2
  • Feature 3
    • Nested Feature

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the Cisco Sample Code License. See LICENSE.md for more information.

(back to top)

Contact

Jason Davis - @SNMPguy - jadavis@cisco.com

Project Link: https://github.com/jasoncdavis/CiscoLiveNOC23US

(back to top)

Acknowledgments

(back to top)

Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.