All Projects → optiz0r → Ansible Multicast Graph

optiz0r / Ansible Multicast Graph

Visualises the multicast trees for a single IPv4 group address using information scraped from NX-OS, EOS and IOS devices using ansible, ntc-ansible and TextFSM

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ansible Multicast Graph

kubeadm-ansible
Kuberadmin ansible is a toolkit for simple and quick installing k8s cluster.
Stars: ✭ 37 (+184.62%)
Mutual labels:  ansible-playbook
pgsentinel
postgresql extension providing Active session history
Stars: ✭ 110 (+746.15%)
Mutual labels:  troubleshooting
Ansible Roles
Ansible Roles
Stars: ✭ 375 (+2784.62%)
Mutual labels:  ansible-playbook
dtail
DTail is a distributed DevOps tool for tailing, grepping, catting logs and other text files on many remote machines at once.
Stars: ✭ 112 (+761.54%)
Mutual labels:  troubleshooting
Excision-Mail
Fullstack, security focused mailserver based on OpenSMTPD for OpenBSD using ansible
Stars: ✭ 108 (+730.77%)
Mutual labels:  ansible-playbook
Cli
✨ A powerful CLI for the Create Go App project. Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!
Stars: ✭ 292 (+2146.15%)
Mutual labels:  ansible-playbook
LaraSible
A complete ansible playbook for create a hosting envorinment with Nginx, PHP-FPM, Redis and MariaDB for Laravel Framework on Linux
Stars: ✭ 15 (+15.38%)
Mutual labels:  ansible-playbook
Homer
HOMER - 100% Open-Source SIP / VoIP Packet Capture & Monitoring
Stars: ✭ 855 (+6476.92%)
Mutual labels:  troubleshooting
aws-lab-guide
Amazon Web Services Practice Lab Guide. Absolute beginners can try this lab practice guide.
Stars: ✭ 25 (+92.31%)
Mutual labels:  ansible-playbook
Greys Anatomy
Java诊断工具
Stars: ✭ 3,812 (+29223.08%)
Mutual labels:  troubleshooting
sip3-twig-ce
SIP3 Twig (Community Edition)
Stars: ✭ 56 (+330.77%)
Mutual labels:  troubleshooting
ansible-digitalocean-sample-playbook
A sample playbook that illustrates how to create and provision a DigitalOcean droplet with Ansible
Stars: ✭ 44 (+238.46%)
Mutual labels:  ansible-playbook
Apache2buddy
apache2buddy
Stars: ✭ 297 (+2184.62%)
Mutual labels:  troubleshooting
ansible qa playbook
A simple ansible playbook to configure Dev and QA machine
Stars: ✭ 21 (+61.54%)
Mutual labels:  ansible-playbook
Tpt Oracle
Tanel Poder's Troubleshooting & Performance Tools for Oracle Databases
Stars: ✭ 429 (+3200%)
Mutual labels:  troubleshooting
lotus-ops
Filecoin cluster deploy ansible playbook and shell scripts.
Stars: ✭ 33 (+153.85%)
Mutual labels:  ansible-playbook
Netshoot
a Docker + Kubernetes network trouble-shooting swiss-army container
Stars: ✭ 3,709 (+28430.77%)
Mutual labels:  troubleshooting
Kubevious
Kubevious - application centric Kubernetes UI and continuous assurance provider
Stars: ✭ 869 (+6584.62%)
Mutual labels:  troubleshooting
Sysdig Inspect
Sysdig Inspect - A powerful opensource interface for container troubleshooting and security investigation
Stars: ✭ 775 (+5861.54%)
Mutual labels:  troubleshooting
Ansible Rails
Ansible: Ruby on Rails Server
Stars: ✭ 317 (+2338.46%)
Mutual labels:  ansible-playbook

ansible-multicast-graph

Visualises the multicast trees for a single IPv4 group address using information scraped from NX-OS, EOS and IOS devices using ansible, ntc-ansible and TextFSM.

It is capable of showing the following information (provided all relevant devices are queried):

  • The Rendezvouz Point device
  • What every other device believes the RP to be (to help detect config mismatches)
  • The direction of traffic flow on the shared multicast tree
  • The direction of traffic flow on any source-specific multicast trees
  • The publishes (IP addresses and name as discovered through LLDP)
  • The subscribers (as discovered through IGMP Snooping and LLDP)

An example report

This tool is very young and could be significantly improved upon. It was a first attempt at doing something useful while studying for Ivan Pepelnjak's Building Network Automation Solutions course.

Quick start

  • Clone this repository
  • Initialise the ntc-ansible submodule:
git submodule update --init --recursive
  • Create a python virtualenv and install the dependencies:
virtualenv env
source env/bin/activate
pip install -r requirements.txt
  • Update the hosts inventory file with your own devices
  • Create a vault file at secrets/vault.yml if you need ssh username and password to access your devices, otherwise just create an empty file there:
ansible-vault create secrets/vault.yml
# or
touch secrets/vault.yml
  • Run the tool for your chosen multicast group with:
ansible-playbook check_group.yml --extra-vars "mcast_group=224.0.0.123"

The rendered graph will be written to the outputs directory with the group address as the filename and a ..png extension, e.g. outputs/224.0.0.123.png.

If you need to use a bastion host to connect to your network devices, uncomment the line in hosts file, and change the hostname of the bastion host there. Also edit ssh_config and set the right hostname there.

Dependencies

  • python (tested with 2.7 only)
  • ansible (tested with 2.3)
  • graphviz

This tool depends on several python libraries which are listed in the requirements.txt file, which is intended to be used with a python virtualenv.

How it works

The playbook has several stages (each of which is tagged and can be run separately):

  • setup - Creates the output directories
  • fetch - Fetches information from each device and writes them to separate output files. This stage is split into mutiple sub-stages, each of which are written to separate fiels. ** fetch-interfaces - Retrieves list of interfaces ** fetch-lags - Retrieves the list of link-aggregation groups ** fetch-neighbours - Retrieves the list of LLDP neighbours ** fetch-rp - Retrieves the Rendezvouz Point ** fetch-mroutes - Retrieves the list of mroutes ** fetch-snooping - Retrieves the list of IGMP subscribers
  • compile - Merges the separate output files into a single report for easier processing
  • generate - Generates the dot graph from the compiled report
  • render - Renders the output png image from the dot graph

The data is scraped from the devices using ntc-ansible and ntc-templates. This tool ships its own modified copy of several of the TextFSM templates shipped by ntc-templates which did not retrieve all of the necessary data. I intend to upstream those modifications when time permits.

All of the business logic for calculating the list of devices and relationships in the dot graph is done (ab)using jinja2 filters.

Contributions

Pull requests are very much welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].