Skip to main content

基于PySlurm的Prometheus Exporter SDK

Project description

pyslurm-prometheus-exporter

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

安装

pip install pyslurm_prometheus_exporter-0.1.1-py3-none-any.whl

(或使用 python -m build pyslurm_prometheus_exporter 生成 wheel 后再安装。)

快速开始

pyslurm-exporter --port 9808 --addr 0.0.0.0

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

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

from pyslurm_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.1.tar.gz (2.0 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.1-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for pyslurm_prometheus_exporter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f1f7456af24a8eceec6ad756dfee27165c7d02f30ab3530bc04bef6acc5f60f0
MD5 e1e97a15b9c1a11ab1a51a07a86f9ea6
BLAKE2b-256 8788edf6ee8486395702a7077f4f2ad2bcaca7f81d6dbe201abd746e2645ee1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyslurm_prometheus_exporter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 798557e573f33ee0bc0e6f85a0bb6c169c5028d6f96d08d46e78ac599e5087ce
MD5 ae10d1c31eea24896b832d95b8acc06a
BLAKE2b-256 708cffa038dd26901ca5ce1749062d9742bfe567a175946de1ddb8a4d9e40f38

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