https://github.com/tes3awy/vetr-summarizer
ACI vetR (Health Check) summarizer tool
https://github.com/tes3awy/vetr-summarizer
aci cisco datacenter devnet python vetr-collector
Last synced: 5 months ago
JSON representation
ACI vetR (Health Check) summarizer tool
- Host: GitHub
- URL: https://github.com/tes3awy/vetr-summarizer
- Owner: Tes3awy
- License: mit
- Created: 2024-09-01T14:29:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-05T14:50:52.000Z (8 months ago)
- Last Synced: 2025-04-23T19:44:36.858Z (6 months ago)
- Topics: aci, cisco, datacenter, devnet, python, vetr-collector
- Language: Jinja
- Homepage: https://pypi.org/project/vetr-summarizer/
- Size: 241 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://developer.cisco.com/codeexchange/github/repo/Tes3awy/vetr-summarizer)

[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)





[](https://saythanks.io/to/Tes3awy)# vetR Summarizer
A Python package for visualizing ACI vetR JSON data from [vetr-collector](https://github.com/brightpuddle/vetr-collector)
# Table of Contents
- [What is vetR Summarizer?](#what-is-vetr-summarizer)
- [Objective](#objective)
- [How it works](#how-it-works)
- [Installation](#installation)
- [Usage](#usage)
- [Use Case](#use-case)
- [Author(s)](#authors)
- [Contributions](#contributions)
## What is vetR Summarizer?
This tool summarizes data from any APIC collected by [vetr-collector](https://github.com/brightpuddle/vetr-collector).
## Objective
This tool processes data collected by [vetr-collector](https://github.com/brightpuddle/vetr-collector) for the ACI health check and displays it in a pretty HTML tabluar format. This tool can also be run from any computer having `aci-vetr-data` collected from any APIC.
In `vetr-collector` v3.3.0, the `aci-vetr-data` directory you get from includes around **91** JSON files.
```bash
$ ls aci-vetr-data
apPlugin.json
bgpRRNodePEp.json
configRsRemotePath.json
coopPol.json
ctxClassCnt.json
datetimeNtpProv.json
datetimePol.json
epControlP.json
epIpAgingP.json
epLoopProtectP.json
...```
_A sample preview of the output HTML_

## How it works
This tool visualizes data collection for the ACI health check from [vetr-collector](https://github.com/brightpuddle/vetr-collector).
Once the analysis is complete, the tool creates a `vetr-summary.html` file. This file displays the raw JSON data in a [DataTable](https://datatables.net/) tabular format. DataTable adds the ability to easily search for properties in concern.
Almost all [MOs](https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/policy-model-guide/b-Cisco-ACI-Policy-Model-Guide.html#id_107445__d54e1142) include unnecessary configuration properties. Some of these properties: `extMngdBy`, `childAction`, `userdom`, etc. These unnecessary properties (key-value pairs) are excluded from the report for a neater representation of the output in the HTML file.
> All excluded keys can be found in [`config/excluded_keys`](https://github.com/Tes3awy/vetr-summarizer/tree/main/src/vetr_summarizer/config) file. You can also customize these keys-to-exclude according to your own case. _An empty excluded\_keys file will not exclude any keys_.
> Raw JSON files with empty `imdata` (i.e. `"[]"`) and `totalCount` equal to `"0"` are not presented in the HTML `vetr-summary.html` summary report.
## Installation
Install from [PyPi](https://pypi.org/project/vetr-summarizer/)
> System-wide
```bash
$ pip install --user vetr-summarizer
```> Virtual Environment
```bash
$ python3 -m venv .venv
$ source .venv/bin/activate .
(.venv)$ pip install vetr-summarizer
```## Usage
> Both keyword arguments are optional. _Currently `html` is the only supported output format_.
```bash
$ vetr-summarizer --help
usage: vetr-summarizer [-h] [-f {html}] [-x EXCLUDED_KEYS_FILE] [-v] directoryProcess and summarize aci-vetr-data JSON files into HTML reports.
positional arguments:
directory A path to the directory containing the JSON files.options:
-h, --help show this help message and exit
-f {html}, --format {html}
Output format (default: html)
-x EXCLUDED_KEYS_FILE, --excluded-keys-file EXCLUDED_KEYS_FILE
File with keys to exclude from raw JSON files. (default: excluded_keys)
-v, --version show program's version number and exitThanks for using vetr-summarizer! :)
``````bash
$ vetr-summarizer "/path/to/aci-vetr-data"HTML output is written to /path/to/vetr-summary.html
```> With custom excluded keys
```bash
$ vetr-summarizer -x custom_excluded_keys "/path/to/aci-vetr-data"HTML output is written to '/path/to/vetr-summary.html'
```## Use Case
I was once going through the Cisco Community searching for an answer to my ACI fabric issue, and I came across that question: [VetR Zip logs](https://community.cisco.com/t5/application-centric-infrastructure/vetr-zip-logs/td-p/4804529), what is actually vetr zip logs?

So, I decided to try `vetr-collector` on an environment. But, I had to open each JSON file to check whether it has objects or not and read the entire JSON file if it has valuable data, and that was time-consuming. So, I made this package to summarize the output from `vetr-collector` in a pretty HTML tabular format.
## Author(s)
[Osama Abbas](https://www.linkedin.com/in/oabbas/)
## Contributions
As there is always a room for imporovment, you are welcome to contribute to `vetr-summarizer`.