Skip to main content

No project description provided

Project description

prometheus-dirsize-exporter

Export directory size metrics efficiently.

Why?

When providing multi-user interactive computing services (with a HPC cluster or with JupyterHub), it's very helpful to know the home directory sizes of each user over time. However, as NFS is often used, running du constantly takes a long time, uses too many IOPS that we may not have many of, and is plain inefficient.

This project provides a way to keep track of directory sizes with a budgeted amount of IOPS. You can ask it to take however much time it needs but not use more than 100 IOPS, and it will do that. We do not necessarily need very up to date directory size metrics, so this is ok.

Limitations

  • As directory contents might change in the course of a single run as we wait for budgets to become available, information about a directory may not be exactly correct immediately.
  • Because we do not spread the IOPS through time, the IO usage is 'spiky' - all IOPS get done at the beginning of a second, and then it goes silent. If you have a big IOPS budget, this can cause performance degradation.

Installation

Install the package from PyPI:

pip install prometheus-dirsize-exporter

Running

You can start the process from the commandline:

dirsize-exporter <path-to-parent-directory> <iops-budget> <wait-time-in-minutes>

For example, to export metrics about directories under /home, using no more than 200 IO operations per second, updating every 60minutes, you would run:

dirsize-exporter /home 200 60

You can check out the metrics by hitting http://localhost:8000. The port can be controlled via a --port argument.

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

prometheus-dirsize-exporter-1.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file prometheus-dirsize-exporter-1.2.tar.gz.

File metadata

File hashes

Hashes for prometheus-dirsize-exporter-1.2.tar.gz
Algorithm Hash digest
SHA256 d1da94b5a34abf8791d3e56a0de1758c749e710df9e0c1695516c3048ce04a0b
MD5 62ff1e96fc58e7b3920dda4d47fe9e80
BLAKE2b-256 ea17e1a97bacd18669138eddd76bb44c9564834577373f9176ee37867042a03f

See more details on using hashes here.

File details

Details for the file prometheus_dirsize_exporter-1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for prometheus_dirsize_exporter-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f32dc8bbee31b5edd8a28a136b7bc2af4ba13c5b89b2dedf6e8885dc0f5956e
MD5 ebc4a125f5d3ea20553c7ce5d543feff
BLAKE2b-256 d22346cb645d15a4ece8ddc703d878d7612b26a5e451122b704f6877689d0a01

See more details on using hashes here.

Supported by

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