Insights Core is a data collection and analysis framework
Project description
Insights Core is a data collection and analysis framework that is built for extensibility and rapid development. Included are a set of reusable components for gathering data in myriad ways and providing a reliable object model for commonly useful unstructured and semi-structured data.
>>> from insights import run
>>> from insights.parsers import installed_rpms as rpm
>>> lower = rpm.Rpm("bash-4.4.11-1.fc26")
>>> upper = rpm.Rpm("bash-4.4.22-1.fc26")
>>> results = run(rpm.Installed)
>>> rpms = results[rpm.Installed]
>>> rpms.newest("bash")
0:bash-4.4.12-7.fc26
>>> lower <= rpms.newest("bash") < upper
True
Features
Over 200 Enterprise Linux data parsers
Support for Python 2.6+ and 3.3+
Built in support for local host collection
Data collection support for several archive formats
Installation
Releases can be installed via pip
$ pip install insights-core
Documentation
There are several resources for digging into the details of how to use insights-core:
The insights-core-tutorials project docs have three tutorials plus instructions on how to setup the tutorial environment
The basic architectural principles of insights-core can be found in the Insights Core tutorial jupyter notebook
A simple stand_alone.py script encapsulates creating all the basic components in a single script that can be easily executed locally
Some quick-start examples are provided in the examples directory. Each subdirectory under examples includes a README.md file that provides a description of the contents and usage information.
To Run the Jupyter Notebooks
If you would like to execute the jupyter notebooks locally, you can install jupyter:
pip install jupyter
To start the notebook server:
jupyter notebook
This should start a web-server and open a tab on your browser. From there, you can navigate to docs/notebooks and select a notebook of interest.
Motivation
Almost everyone who deals with diagnostic files and archives such as sosreports or JBoss server.log files eventually automates the process of rummaging around inside them. Usually, the automation is comprised of fairly simple scripts, but as these scripts get reused and shared, their complexity grows and a more sophisticated design becomes worthwhile.
A general process one might consider is:
Collect some unstructured data (e.g. from a command, an archive, a directory, directly from a system)
Convert the unstructured data into objects with standard APIs.
Optionally combine some of the objects to provide a higher level interface than they provide individually (maybe all the networking components go together to provide a high level API, or maybe multiple individual objects provide the same information. Maybe the same information can be gotten from multiple sources, not all of which are available at the same time from a given system or archive).
Use the data model above at any granularity to write rules that formalize support knowledge, persisters that build database tables, metadata components that extract contextual info for other systems, and more.
Insights Core provides this functionality. It is an extensible framework for collecting and analyzing data on systems, from archives, directories, etc. in a standard way.
Insights Core versus Red Hat Insights
A common confusion about this project is how it relates to Red Hat Insights. Red Hat Insights is a product produced by Red Hat for automated discovery and remediation of issues in Red Hat products. The insights-core project is used by Red Hat Insights, but only represents the data collection and rule analysis infrastructure. This infrastructure is meant to be reusable by other projects.
So, insights-core can be used for individuals wanting to perform analysis locally, or integrated into other diagnostics systems. Parsers or rules written using insights-core can be executed in Red Hat Insights, but, it is not a requirement.
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_core-3.4.22.tar.gz
.
File metadata
- Download URL: insights_core-3.4.22.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cec5d9943a0dd852684364204ae9d387408c16707abefea377c3645e94e3255 |
|
MD5 | 11537f74867ae7eaf87e811e5068866c |
|
BLAKE2b-256 | 1e9e987c2a9fe64477c2f2fc294e1edb70008b152b17a6231990e32a7ee75563 |
File details
Details for the file insights_core-3.4.22-py3-none-any.whl
.
File metadata
- Download URL: insights_core-3.4.22-py3-none-any.whl
- Upload date:
- Size: 2.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 840632663d9a2a737ce498f697259b720cba3267dd1ff180ddeffdc3d8bb052c |
|
MD5 | 4e118a40202fb8d363ee85ea836511ac |
|
BLAKE2b-256 | b161605c918218dda15b996e75a53e3448e15afc54f13832ad82c73ecb956067 |