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
Hashes for opium-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c256acaa132d58ddd4af5ecccaef1b9dd2edd35545da60833713a68542af586 |
|
MD5 | 2d320165f1a1e8cd808a7a12b955bba8 |
|
BLAKE2b-256 | bbf823513dab75f292f5c1816ca370e53cd2636350645129a83475aaca888fb4 |