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

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.1.tar.gz (17.9 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.1-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lsf_prometheus_exporter-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9aa9d5e04ea1e2f6692f3c95b2cd0eccc2521925ef43916337b60c92f08c8b93
MD5 0cecf1641470a2421370559b774ef2f3
BLAKE2b-256 f973a8d7357cc900c76ea075fc9b759fd296a31fc7a641d432c453ac327bf6b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lsf_prometheus_exporter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dab3b3d92f8c0e68b30e84c6e8d6f8e343d882974a280e83a094da6569d5edb3
MD5 15a804ad75250be4151ffbcd800e3034
BLAKE2b-256 82c1da3fd74fa9907b52fb265df20879b0bbf0d2bad63d97c8e51ddeada63b3b

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