insights-core


Nameinsights-core JSON
Version 3.3.24 PyPI version JSON
download
home_pagehttps://github.com/redhatinsights/insights-core
SummaryInsights Core is a data collection and analysis framework
upload_time2024-05-23 08:15:17
maintainerNone
docs_urlNone
authorRed Hat, Inc.
requires_pythonNone
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            =============
Insights Core
=============

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.

.. code-block:: python

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

.. code-block:: shell

    $ pip install insights-core

Documentation
-------------

There are several resources for digging into the details of how to use ``insights-core``:

- A `detailed walk through of the constructing a rule
  <https://github.com/RedHatInsights/insights-core/blob/master/docs/notebooks/Diagnostic%20Walkthrough.ipynb>`_
- The `insights-core-tutorials project docs <https://insights-core-tutorials.readthedocs.io/en/latest/>`_
  have three tutorials plus instructions on how to setup the tutorial environment

  - `Preparing Your Development Environment
    <https://insights-core-tutorials.readthedocs.io/en/latest/prep_tutorial_env.html>`_
  - `Custom Parser Development
    <https://insights-core-tutorials.readthedocs.io/en/latest/customtut_parsers.html>`_
  - `Custom Combiner Development
    <https://insights-core-tutorials.readthedocs.io/en/latest/combiner_tutorial.html>`_
  - `Rule Development
    <https://insights-core-tutorials.readthedocs.io/en/latest/rule_tutorial_index.html>`_


- The basic architectural principles of ``insights-core`` can be found in
  the `Insights Core
  <https://github.com/RedHatInsights/insights-core/blob/master/docs/notebooks/Insights%20Core%20Tutorial.ipynb>`_ tutorial jupyter notebook
- A simple `stand_alone.py
  <https://github.com/RedHatInsights/insights-core/blob/master/examples/rules/stand_alone.py>`_
  script encapsulates creating all the basic components in a single script
  that can be easily executed locally
- Some `quick-start examples
  <https://github.com/RedHatInsights/insights-core/blob/master/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:

.. code-block:: bash

    pip install jupyter

To start the notebook server:

.. code-block:: bash

    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 <https://access.redhat.com/insights/>`_.  Red Hat Insights is a
product produced by `Red Hat <https://www.redhat.com>`_ 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/redhatinsights/insights-core",
    "name": "insights-core",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Red Hat, Inc.",
    "author_email": "insights@redhat.com",
    "download_url": "https://files.pythonhosted.org/packages/91/76/866252627f7bb6709063a0410501eed872f2f1b9bfa416798e22bc0da797/insights_core-3.3.24.tar.gz",
    "platform": null,
    "description": "=============\nInsights Core\n=============\n\nInsights Core is a data collection and analysis framework that is built\nfor extensibility and rapid development.  Included are a set of reusable\ncomponents for gathering data in myriad ways and providing a reliable\nobject model for commonly useful unstructured and semi-structured data.\n\n.. code-block:: python\n\n    >>> from insights import run\n    >>> from insights.parsers import installed_rpms as rpm\n    >>> lower = rpm.Rpm(\"bash-4.4.11-1.fc26\")\n    >>> upper = rpm.Rpm(\"bash-4.4.22-1.fc26\")\n    >>> results = run(rpm.Installed)\n    >>> rpms = results[rpm.Installed]\n    >>> rpms.newest(\"bash\")\n    0:bash-4.4.12-7.fc26\n    >>> lower <= rpms.newest(\"bash\") < upper\n    True\n\nFeatures\n--------\n\n* Over 200 Enterprise Linux data parsers\n* Support for Python 2.6+ and 3.3+\n* Built in support for local host collection\n* Data collection support for several archive formats\n\nInstallation\n------------\n\nReleases can be installed via pip\n\n.. code-block:: shell\n\n    $ pip install insights-core\n\nDocumentation\n-------------\n\nThere are several resources for digging into the details of how to use ``insights-core``:\n\n- A `detailed walk through of the constructing a rule\n  <https://github.com/RedHatInsights/insights-core/blob/master/docs/notebooks/Diagnostic%20Walkthrough.ipynb>`_\n- The `insights-core-tutorials project docs <https://insights-core-tutorials.readthedocs.io/en/latest/>`_\n  have three tutorials plus instructions on how to setup the tutorial environment\n\n  - `Preparing Your Development Environment\n    <https://insights-core-tutorials.readthedocs.io/en/latest/prep_tutorial_env.html>`_\n  - `Custom Parser Development\n    <https://insights-core-tutorials.readthedocs.io/en/latest/customtut_parsers.html>`_\n  - `Custom Combiner Development\n    <https://insights-core-tutorials.readthedocs.io/en/latest/combiner_tutorial.html>`_\n  - `Rule Development\n    <https://insights-core-tutorials.readthedocs.io/en/latest/rule_tutorial_index.html>`_\n\n\n- The basic architectural principles of ``insights-core`` can be found in\n  the `Insights Core\n  <https://github.com/RedHatInsights/insights-core/blob/master/docs/notebooks/Insights%20Core%20Tutorial.ipynb>`_ tutorial jupyter notebook\n- A simple `stand_alone.py\n  <https://github.com/RedHatInsights/insights-core/blob/master/examples/rules/stand_alone.py>`_\n  script encapsulates creating all the basic components in a single script\n  that can be easily executed locally\n- Some `quick-start examples\n  <https://github.com/RedHatInsights/insights-core/blob/master/examples>`_\n  are provided in the ``examples`` directory. Each subdirectory under examples\n  includes a ``README.md`` file that provides a description of the contents\n  and usage information.\n\nTo Run the Jupyter Notebooks\n++++++++++++++++++++++++++++\n\nIf you would like to execute the jupyter notebooks locally, you can\ninstall jupyter:\n\n.. code-block:: bash\n\n    pip install jupyter\n\nTo start the notebook server:\n\n.. code-block:: bash\n\n    jupyter notebook\n\nThis should start a web-server and open a tab on your browser.  From\nthere, you can navigate to ``docs/notebooks`` and select a notebook of\ninterest.\n\nMotivation\n----------\n\nAlmost everyone who deals with diagnostic files and archives such as\nsosreports or JBoss server.log files eventually automates the process of\nrummaging around inside them. Usually, the automation is comprised of\nfairly simple scripts, but as these scripts get reused and shared, their\ncomplexity grows and a more sophisticated design becomes worthwhile.\n\nA general process one might consider is:\n\n#. Collect some unstructured data (e.g. from a command, an archive, a\n   directory, directly from a system)\n\n#. Convert the unstructured data into objects with standard APIs.\n\n#. Optionally combine some of the objects to provide a higher level\n   interface than they provide individually (maybe all the networking\n   components go together to provide a high level API, or maybe multiple\n   individual objects provide the same information. Maybe the same\n   information can be gotten from multiple sources, not all of which are\n   available at the same time from a given system or archive).\n\n#. Use the data model above at any granularity to write rules that\n   formalize support knowledge, persisters that build database tables,\n   metadata components that extract contextual info for other systems,\n   and more.\n\nInsights Core provides this functionality. It is an extensible framework\nfor collecting and analyzing data on systems, from archives,\ndirectories, etc. in a standard way.\n\nInsights Core versus Red Hat Insights\n-------------------------------------\n\nA common confusion about this project is how it relates to `Red Hat\nInsights <https://access.redhat.com/insights/>`_.  Red Hat Insights is a\nproduct produced by `Red Hat <https://www.redhat.com>`_ for automated\ndiscovery and remediation of issues in Red Hat products.  The\n``insights-core`` project is used by Red Hat Insights, but only represents\nthe data collection and rule analysis infrastructure.  This\ninfrastructure is meant to be reusable by other projects.\n\nSo, ``insights-core`` can be used for individuals wanting to perform\nanalysis locally, or integrated into other diagnostics systems.  Parsers\nor rules written using ``insights-core`` can be executed in Red Hat\nInsights, but, it is not a requirement.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Insights Core is a data collection and analysis framework",
    "version": "3.3.24",
    "project_urls": {
        "Homepage": "https://github.com/redhatinsights/insights-core"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ea716754823693308eff254a2b6c35e45f9d90a8137b064926b2eabf5b998b4",
                "md5": "d0298c38fd69b4f75a03cb06868b37b8",
                "sha256": "ab24b5a6bb1b81cc0e8aa6b6200a26552afbbb3532fd5b508445dce7daeeb059"
            },
            "downloads": -1,
            "filename": "insights_core-3.3.24-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d0298c38fd69b4f75a03cb06868b37b8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 2379930,
            "upload_time": "2024-05-23T08:15:08",
            "upload_time_iso_8601": "2024-05-23T08:15:08.974332Z",
            "url": "https://files.pythonhosted.org/packages/2e/a7/16754823693308eff254a2b6c35e45f9d90a8137b064926b2eabf5b998b4/insights_core-3.3.24-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9176866252627f7bb6709063a0410501eed872f2f1b9bfa416798e22bc0da797",
                "md5": "fe70b916ae28291bb3329dfe17573f08",
                "sha256": "58c641275569def07806fee23083dea52bae5cc0ed627f4bd939e54594e74ddc"
            },
            "downloads": -1,
            "filename": "insights_core-3.3.24.tar.gz",
            "has_sig": false,
            "md5_digest": "fe70b916ae28291bb3329dfe17573f08",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1821518,
            "upload_time": "2024-05-23T08:15:17",
            "upload_time_iso_8601": "2024-05-23T08:15:17.112969Z",
            "url": "https://files.pythonhosted.org/packages/91/76/866252627f7bb6709063a0410501eed872f2f1b9bfa416798e22bc0da797/insights_core-3.3.24.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-23 08:15:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "redhatinsights",
    "github_project": "insights-core",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "insights-core"
}
        
Elapsed time: 0.27946s