opium
OpenShift Pod Independent Usage Metrics (OPIUM) pulling & aggregating metrics from multiple pods made easy!
Free software: MIT license
Documentation: https://opium.readthedocs.io.
Aggregating metrics from pods through OKD’s router can be a challenge. OPIUM offers the next best thing. While it doesn’t (yet) aggregate the varius metrics it gathers the metrics from the defined Deployment Configs on a specific OKD project and serves them to a single /metrics endpoint. This way it allows for easier gathering of per-pod metrics.
Configuration
OPIUM is configured through environment variables and specifically the following:
OPIUM_OKD_URL => The url of the OKD instance’s master, including the scheme and without a trailing /
OPIUM_OKD_TOKEN => An access token for a service account with view and edit permissions on the desired project
OPIUM_PROJECT => Project to be exported
OPIUM_DEPLOYMENT_CONFIGS => Comma separated (no spaces) list of Deployment Configs to export
OKD Preparation
In your OKD admin CLI you will need to run the following
# create a service account
oc create serviceaccount <account>
# Retrieve the service account's access token (set this to OPIUM_OKD_TOKEN)
oc serviceaccounts get-token <account>
# Give the service account the required permissions to the desired project
oc policy add-role-to-user view system:serviceaccount:<project>:<account>
oc policy add-role-to-user edit system:serviceaccount:<project>:<account>
Execution
To start OPIUM (after you’ve set the configuration environment variables appropriately) simly run:
opium
This will spawn an HTTP server listening on your system’s public interface and on port 8080.
Configuration for the listening interface, as well as a containerized version of OPIUM will follow in later versions.
Features
Gather the response of /metrics from all the pods of the specified deployment_config
Serve them as one response
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2020-10-25)
First release on PyPI.
Metadata
Release files for opium 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| opium-0.1.1.tar.gz | 12.4 kB | Without provenance | Details for opium-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opium-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for opium-0.1.1-py2.py3-none-any.whl |
Total release size: 18.5 kB
Release files / opium-0.1.1.tar.gz
| Download URL | opium-0.1.1.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0fed721cc927a0fd7bd5492b2962bcebb6252b34312fa03a322fcc85428b09d6
|
|
BLAKE2b-256 checksum How to use checksums |
8c674cc65cfbfb772f1581ceb777e301f6b8ad09c950863d77545d3bc65d0033
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.0
|
Release files / opium-0.1.1-py2.py3-none-any.whl
| Download URL | opium-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0c256acaa132d58ddd4af5ecccaef1b9dd2edd35545da60833713a68542af586
|
|
BLAKE2b-256 checksum How to use checksums |
bbf823513dab75f292f5c1816ca370e53cd2636350645129a83475aaca888fb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.0
|
Security for opium 0.1.1
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.