Skip to main content

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 :)

Metadata

Release files for insights-net 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for insights-net 0.0.2
File Size Uploaded Provenance Actions
insights-net-0.0.2.tar.gz 30.0 kB Without provenance Details for insights-net-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for insights-net 0.0.2
File Interpreter ABI Platform Actions
insights_net-0.0.2-py3-none-any.whl Python 3 none any Details for insights_net-0.0.2-py3-none-any.whl

Total release size: 66.7 kB

Release files / insights-net-0.0.2.tar.gz

Download URL insights-net-0.0.2.tar.gz
Size 30.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c4363280039a097aaa7e64ecea86fdf38baebefe80db15cc828d41b34839ef91
BLAKE2b-256 checksum
How to use checksums
929544ad8448e84c087cc5174b671a64ef492d451583acc1cadacfd851735f97
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / insights_net-0.0.2-py3-none-any.whl

Download URL insights_net-0.0.2-py3-none-any.whl
Size 36.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83b2e0f43ec561ddf2dc74c8bb5318126514afae0a322ae4fc544ad7832f11bd
BLAKE2b-256 checksum
How to use checksums
34927aa808453f6519b69179f7a9a508bfe64bfae54b78cd92d8a7165a307ccb
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for insights-net 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page