Skip to main content

LSF Prometheus Exporter

Project description

lsf_prometheus_exporter

Prometheus Exporter for LSF based on https://www.gaborsamu.com/blog/lsf_tig/

System Requirements

  • LSF 10.1.0.15 (Fix Pack 15) or newer
  • Python 3.11 or newer
  • Should only be installed on LSF management or management candidate hosts

Run the exporter

Install via pip

  1. Run pip install lsf_prometheus_exporter
  2. Ensure environment variables are set by running $LSF_ROOTDIR/conf/profile.lsf
  3. Run exporter with python -m lsf_prometheus_exporter or lsf_prometheus_exporter

Note: Ensure the user running the exporter is configured as an LSF adminstrator. Otherwise, not all LSF metrics may be captured.

Clone the repo

  1. Ensure LSF cluster is installed and running.
  2. Ensure environment variables are set by running $LSF_ROOTDIR/conf/profile.lsf
  3. Install dependencies with pip install -r requirements.txt
  4. Start exporter with python lsf_prometheus_exporter.py

For statistics from badmin perfmon, ensure perfmon service is started with badmin perfmon start or set SCHED_METRIC_ENABLE=Y in lsb.params

For statistics from badmin rc view, ensure resource connector service (ebrokerd) is running

Test the exporter

Run the following command on the same host on which you started the exporter.

curl http://127.0.0.1:9405/metrics

This assumes that the exporter runs with the default port.

Optional Configuration

Configuring the exporter is done via environment variables.

LSF_PROMETHEUS_DEBUG

Y|N (default N)

Exporter will print debug messages to stdout if set to Y

LSF_PROMETHEUS_POLLING_INTERVAL_SECONDS

Time in Seconds (default 10)

Exporter will poll LSF for data based on this interval

LSF_PROMETHEUS_PORT

Port number (default 9405)

Prometheus HTTP server port.

LSF_PROMETHEUS_BINDING_ADDRESS

Binding address (Default "127.0.0.1")

Prometheus HTTP binding address

LSF_PROMETHEUS_MGR_HOST_ONLY

Y|N (default Y)

For LSF HA deployment where multiple management nodes are configured. Enable this parameter to check if the current management node is active, and only collect metrics if it is. This is to ensure metrics are not duplicated if multiple exporters are installed and running on multiple hosts in the same cluster.

LSF_PROMETHEUS_HOST_STATUS_DETAIL

Y|N (default N)

Enabled detailed status info for lsf_host_status

LSF_PROMETHEUS_EXCLUDE_COMPUTE_NODES

Y|N (default N)

Exclude compute nodes metric collection

LSF_PROMETHEUS_IGNORE_METRICS

String (default "")

The above variable can be used to ignore metrics. Eg: export LSF_PROMETHEUS_IGNORE_METRICS="metric1,metric2,metric3,.........,metricn"

LSF_PROMETHEUS_ASYNC_COLLECTORS

Y|N (default N) Enables the use of asynchronous fetch operations when querying data from LSF

HTTPS Configuration

LSF_PROMETHEUS_HTTPS_CERT_FILE

Path to certificate file (Default None)

Path to SSL certificate file. Required along with key file to enable HTTPS

LSF_PROMETHEUS_HTTPS_KEY_FILE

Path to key file (Default None)

Path to SSL key file. Required along with certificate file to enable HTTPS

mTLS Configuration

Use mutual TLS to authenticate clients. HTTPS must be enabled to enable mTLS

LSF_PROMETHEUS_HTTPS_MTLS_ENABLE

Y|N (Default N)

Enable mTLS authentication. If the the below mTLS parameters are not configured, then a default CA certificate chain will be used (see https://docs.python.org/3/library/ssl.html#ssl.SSLContext.load_default_certs)

LSF_PROMETHEUS_HTTPS_MTLS_CAFILE

Path to CA file (Default None)

CA file with certificate chain used to validate client certificates

LSF_PROMETHEUS_HTTPS_MTLS_CAPATH

Path to CA directory (Default None)

Directory containing CA certificate chain used to validate client certificates

lsf_prometheus_exporter.py

Primary entry point. Instantiates exporter classes and starts the http server while running an infinite fetch loop

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

lsf_prometheus_exporter-1.0.2.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

lsf_prometheus_exporter-1.0.2-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file lsf_prometheus_exporter-1.0.2.tar.gz.

File metadata

  • Download URL: lsf_prometheus_exporter-1.0.2.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for lsf_prometheus_exporter-1.0.2.tar.gz
Algorithm Hash digest
SHA256 9962b36ae6d21a5039f6fb6b3f8a7ce36bcae6cd74d3583bb5d36f03566495fb
MD5 1784e6ce813328a65d9f969e8e75ff90
BLAKE2b-256 f061b8f066b96bcc9d051cdcfb17a4c20fdde06228d080f40c8632babd1f86bb

See more details on using hashes here.

File details

Details for the file lsf_prometheus_exporter-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for lsf_prometheus_exporter-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 145026d62c281a34002ace92d8503da00c03b2d14e0f041e98e7d67d345839be
MD5 d733ca1c06846ae3312906087978eb4c
BLAKE2b-256 72c7fc407cd28a162409361a45f3b1ed9cb46c9c3614ea21eb4bec50befbff8d

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