OpenShift Pod Independent Usage Metrics (OPIUM) pulling & aggregating metrics from multiple pods made easy!
Project description
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.
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 opium-0.1.1.tar.gz
.
File metadata
- Download URL: opium-0.1.1.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fed721cc927a0fd7bd5492b2962bcebb6252b34312fa03a322fcc85428b09d6 |
|
MD5 | 45c07f2768280a9950e9c53ca9e09727 |
|
BLAKE2b-256 | 8c674cc65cfbfb772f1581ceb777e301f6b8ad09c950863d77545d3bc65d0033 |
File details
Details for the file opium-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: opium-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 2, Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c256acaa132d58ddd4af5ecccaef1b9dd2edd35545da60833713a68542af586 |
|
MD5 | 2d320165f1a1e8cd808a7a12b955bba8 |
|
BLAKE2b-256 | bbf823513dab75f292f5c1816ca370e53cd2636350645129a83475aaca888fb4 |