Skip to main content

基于PySlurm的Prometheus Exporter SDK

Project description

pyslurm-prometheus-exporter

基于 PySlurm 的 Prometheus Exporter SDK,可快速暴露 Slurm 作业、节点、分区等核心指标。

安装

pip install pyslurm-prometheus-exporter

(如需本地构建,可在项目目录执行 python -m build 后安装 dist/ 下生成的 wheel。)

快速开始

pyslurm-exporter --port 9808 --addr 0.0.0.0

访问 http://<host>:9808/metrics 获取指标;若需单节点维度可追加 --node-detail

若希望以库的方式集成,可在代码中调用:

from slurm_prometheus_exporter import SlurmCollector, start_http_exporter

collector = SlurmCollector(include_node_detail=False)
start_http_exporter(port=9808, collector=collector)

更多示例与说明可参考仓库根目录 docs/prometheus_exporter.mdexamples/prometheus_exporter.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyslurm_prometheus_exporter-0.1.2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyslurm_prometheus_exporter-0.1.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file pyslurm_prometheus_exporter-0.1.2.tar.gz.

File metadata

File hashes

Hashes for pyslurm_prometheus_exporter-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d46b4a3c1763ab4643473197f25a04ad7b53464e84974032df2862293b906d5b
MD5 fe51f3936aab6c70dcacc029842701ef
BLAKE2b-256 b7da31bf98f8ecff7a3012cd8a39a5e9c91d1f59359c445304ed3118f7766291

See more details on using hashes here.

File details

Details for the file pyslurm_prometheus_exporter-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pyslurm_prometheus_exporter-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1dfae1030342de6c74f29c00c20279a1194cb352d57f2edf34adabcff268b1c5
MD5 0b41de8bac6678b7f44fa8f63bba6fd6
BLAKE2b-256 a980350ad23bb77f7921749f4850ac5b7557358486d2ce1ad02cd1509240856c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page