Install & Compatibility
Where this runs
tested against v3.7.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.461s · 54.8MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 4.7s · import 0.440s · 56MB
56MB installed
● package 56MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
load_default_plugins
✓ from insights import load_default_plugins, run
run
✓ from insights import load_default_plugins, run
installed_rpms
✓ from insights.parsers import installed_rpms as rpm
Commonly aliased as 'rpm' for convenience.
dr
✓ from insights.core import dr
Used for dependency resolution and component registration.
Initializes insights-core by loading default plugins (parsers, combiners, rules) and then demonstrates how to execute components to gather and analyze data, such as finding the newest version of a package. In a full system, `run()` would operate within a specific context (e.g., a live host or an archive) to collect and process data.
from insights import load_default_plugins, run
from insights.parsers import installed_rpms as rpm
# Load all default insights components (parsers, combiners, rules)
load_default_plugins()
# Simulate running insights on a system and collect installed RPMs
# In a real scenario, `run()` would process collected data from a host or archive.
# For this example, we'll access the parser directly, typically data comes via contexts.
# To get actual data, you would normally specify a context, e.g., HostContext
# Example of getting parsed data (conceptual, run() works with a Broker context)
# Normally, the run() call would fill the broker with data from all active components.
# For a local execution, you might run `insights-run` CLI or use specific contexts.
# Let's illustrate with a simple check using a known parser output.
# In a programmatic usage, `run()` is typically invoked on a Broker.
# This example is adapted from the PyPI description.
# The 'run' function typically takes a list of components or a Broker instance.
# For a simple local check without a full host context setup:
# If you were running against a system, 'run()' would implicitly collect data.
# For a quick local check on a parser, you'd feed it content.
# The example from PyPI is more illustrative of using the *results* from a run.
# This is a conceptual example based on docs, actual `run()` requires a context or data feed.
# A direct `run()` call will gather data based on active contexts (e.g., HostContext by default).
results = run(rpm.Installed)
# Accessing the parsed RPM data from the results
if rpm.Installed in results:
installed_rpms_data = results[rpm.Installed]
print(f"Newest bash version: {installed_rpms_data.newest('bash')}")
else:
print("Installed RPMs data not found in results.")
# Note: To run this against actual system data, `insights-core` typically
# works with data collected by `insights-client` or processed via specific contexts.
# A simple `run()` without explicit context uses the default HostContext if available.
insights --version
Debug
Known issues
deprecatedSpecific functions, class methods, and entire classes within `insights-core` are subject to deprecation. Refer to the 'Feature Deprecation' section in the official documentation for an 'insights-core release timeline' to see which features will be removed in upcoming minor versions.fixConsult the official documentation's 'Feature Deprecation' section before upgrading to identify and migrate away from deprecated components.
affects: All versions (future removals from 3.x to 3.x+1)
gotchaWhen using `insights-client` to update `insights-core`, the client might not download the latest core egg due to persistent ETags, leading to an outdated core version despite successful client execution.fixIf `insights-client --version` shows an outdated core or updates fail, manually remove the ETag files: `/etc/insights-client/.insights-core.etag` and `/etc/insights-client/.insights-core.gpg-sig.etag` (or similar paths) before re-running `insights-client`.
affects: All versions integrated with `insights-client`
gotchaUsers often encounter '500: Internal Server Error' when `insights-client` attempts to fetch the `insights-core.egg` from a Red Hat Satellite server, particularly after Satellite upgrades. This can prevent the core from updating.fixThis often points to an issue with the Satellite server configuration or a proxy. Check Satellite logs for more details. If using Insights On-Prem, ensure the `insights-client` is correctly registered or unregister and re-register using `insights-client --unregister`.
affects: All versions integrated with `insights-client` in Satellite environments (especially Satellite 6.9.x and 6.17)
Errors
Common errors & fixes
Unable to fetch egg url ... 500: Internal Server Error. Defaulting to /release Machine-id found
The `insights-client` failed to download the `insights-core.egg` from the configured URL (often a Red Hat Satellite server) due to a server-side or network error.
fixInspect the Satellite server logs for specific errors. Verify network connectivity from the client to the Satellite server. If applicable, try unregistering and re-registering the `insights-client` using `insights-client --unregister`.
insights-client --version shows an old Core version after client execution.
The `insights-client` might be caching the ETag for the `insights-core.egg` file, leading it to believe the local version is still current, thus not downloading a newer available version.
fixDelete the ETag cache files, typically located at `/etc/insights-client/.insights-core.etag` and `/etc/insights-client/.insights-core.gpg-sig.etag`, then re-run `insights-client`.
ImportError: No module named 'insights.core.dr' (or similar for other core modules)
The `insights-core` package is either not installed, or the Python environment where the script is being run does not have access to the installed package. This can happen in isolated virtual environments.
fixEnsure `insights-core` is installed in the active Python environment (`pip install insights-core`). If using a virtual environment, make sure it's activated before running the script. Verify the Python executable path.
Upgrade
Version history
3.7.6latest on PyPI · released Apr 28, 2026
Audit
Dependencies
No dependency data recorded yet.