A Python package for visualizing ACI vetR JSON data
Project description
Table of Contents
vetR Summarizer
This tool summarizes data from any APIC collected by vetr-collector.
Objective
This tool processes data collected by 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.
The aci-vetr-data
directory you get from vetr-collector v3.3.0
includes 91 raw JSON files.
$ ls aci-vetr-data
apPlugin.json
bgpRRNodePEp.json
configRsRemotePath.json
coopPol.json
ctxClassCnt.json
datetimeNtpProv.json
datetimePol.json
epControlP.json
epIpAgingP.json
epLoopProtectP.json
...
<output_truncated>
A sample preview of the output HTML
How it works
This tool visualizes data collection for the ACI health check from 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 tabular format. DataTable adds the ability to easily search for properties in concern.
Almost all MOs 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
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
andtotalCount
equal to0
are not presented in the HTMLvetr-summary.html
summary report.
Installation
Install from PyPi
System-wide
$ pip install --user vetr-summarizer
Virtual Environment
$ 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.
$ vetr-summarizer --help
usage: vetr-summarizer [-h] [-f {html}] [-x EXCLUDED_KEYS_FILE] [-v] directory
Process 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 exit
Thanks for using vetr-summarizer! :)
$ vetr-summarizer "/path/to/aci-vetr-data"
HTML output is written to /path/to/vetr-summary.html
With custom excluded keys
$ 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 and found a question, what is actually vetr zip logs?
So, I decided to try vetr-collector
on an environment. But, I got to open each raw JSON file to check whether it has objects and was time-consuming going through all the files. So, I made this package to summarize the output from vetr-collector
in a pretty HTML tabular format.
Author
Contributions
As there is always a room for imporovment, you are welcome to contribute to vetr-summarizer
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vetr_summarizer-0.3.1.tar.gz
.
File metadata
- Download URL: vetr_summarizer-0.3.1.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c15877643a32eeb7fe27ef7ebdd6a97dd8c2cc151d019258d2d24d3d741a6259 |
|
MD5 | 453cd144dc925daa5b6fad8e984ce86e |
|
BLAKE2b-256 | 68e1481b794baf17fb4d23215b9d2e342ed3b840301fa5cba8f033ee707e2ddb |
File details
Details for the file vetr_summarizer-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: vetr_summarizer-0.3.1-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2975f0c6b47429e6aca3e4261eb8ebe597624af962c52a6419907b918f2d6481 |
|
MD5 | d774af5cf5a8ade5f334fe78e27498d6 |
|
BLAKE2b-256 | aa5a38a59c6acc140e4da2c39ed3564a74146c6448aefce2bf558000a8db585d |