Network analysis tools based on insights-core
Project description
insights-net
Network analysis tool based on insights-core.
It provides:
- A set of plugins that support parsing networking-related logs
- A CLI tool that allows running commands to extract information from log archives.
Getting started
After cloning the repository, create a venv and install the tool
(Optional) Create a virtual environment:
$ python -m venv venv && . ./venv/bin/activate
Install the tool:
$ (venv) pip install .
Run insights shell
insights-net
supports connecting to a running instance of insights shell and
extract information from it. For more details about insights shell
, visit the
insights documentation.
Run insights shell
on kernel-mode ("-k" or "--kernel") on the archives you want to analyze and specify the load insights-net plugins:
$ insights shell -k -p insights_net.plugins samples/ovn/sosreport-compute-0-2021-06-03-awkezkh samples/ovn/sosreport-controller-0-2021-06-03-qjzsrnv
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.
To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.
To read more about this, see https://github.com/ipython/ipython/issues/2049
To connect another client to this kernel, use:
--existing kernel-3973772.json
Now, in another terminal, you can run insights-net to introspect the archives:
$ insights-net
Usage: insights-net [OPTIONS] COMMAND [ARGS]...
Options:
-v, --verbose Be verbose
--help Show this message and exit.
Commands:
find-ip Get all the available information regarding an IP(v4/6) address
host Show basic host information
info Show basic information of the archives
ovn Show the OVN configuration
stop Stop the background running insights kernel
Extracting data from running running OVSDB servers
insights-net
has a plugin that supports extracting OVS, OVN NB and OVN SB information from a running ovsdb-server that serves such databases.
In order to use it, start an ovsdb-server you want to inspect (you might want to use the help of ovs-offline). Note only unix-domain socket transport is supported.
Then, just add the directory where the socket file stored to the insights shell
command line as another archive, e.g:
insights shell -k -p insights_net.plugins /var/run/openvswitch
You can now examine the OVS or OVN databases using the insights-net command line:
insights-net ovs list {TABLE_NAME} [--list]
or
insights-net ovn nb list {TABLE_NAME} [--list]
or
insights-net ovn sb list {TABLE_NAME} [--list]
Other commands (such as insights-net find-ip
) will also process information from such OVSDB instances
Example commands:
Dump a brief summary of the host information:
$ insights-net host
Archive: samples/ovn/sosreport-compute-0-2021-06-03-awkezkh
**************************** *******************************
HostName: compute-0.redhat.local
Red Hat Version:
Product: Red Hat Enterprise Linux
Version: 8.2
Code Name: Ootpa
Kernel:
Version : 4.18.0
Release: 193.51.1.el8_2
Arch: x86_64
Uptime for 1 days 19:45 hh:mm
Selinux: enabled
Archive: samples/ovn/sosreport-controller-0-2021-06-03-qjzsrnv
**************************************************************
HostName: controller-0.redhat.local
Red Hat Version:
Product: Red Hat Enterprise Linux
Version: 8.2
Code Name: Ootpa
Kernel:
Version : 4.18.0
Release: 193.51.1.el8_2
Arch: x86_64
Uptime for 1 days 19:57 hh:mm
Selinux: enabled
Find IP address information:
$ insights-net find-ip 172.17.1.85
Archive: samples/ovn/sosreport-compute-0-2021-06-03-awkezkh
***********************************************************
Neighbor Matches
----------------
Address: 172.17.1.85
Device: vlan20
LLAdr: 9e:9f:65:95:53:34
Reachibility: REACHABLE
...
Contribute
Are you debugging a networking issue and you would like a tool to automate any information collection, processing or visualization? Do reach out to:
Adrián Moreno amorenoz@redhat.com IRC:amorenoz
And, off course, PRs are welcome :)
Project details
Release history Release notifications | RSS feed
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 insights-net-0.0.2.tar.gz
.
File metadata
- Download URL: insights-net-0.0.2.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4363280039a097aaa7e64ecea86fdf38baebefe80db15cc828d41b34839ef91 |
|
MD5 | b765b836aee40a187944d9ab2420a92c |
|
BLAKE2b-256 | 929544ad8448e84c087cc5174b671a64ef492d451583acc1cadacfd851735f97 |
File details
Details for the file insights_net-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: insights_net-0.0.2-py3-none-any.whl
- Upload date:
- Size: 36.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83b2e0f43ec561ddf2dc74c8bb5318126514afae0a322ae4fc544ad7832f11bd |
|
MD5 | fd6b9c162e8ae64cf39dad6ffe6209e4 |
|
BLAKE2b-256 | 34927aa808453f6519b69179f7a9a508bfe64bfae54b78cd92d8a7165a307ccb |