Skip to content

Latest commit

ย 

History

History
60 lines (41 loc) ยท 1.77 KB

README.md

File metadata and controls

60 lines (41 loc) ยท 1.77 KB

๐Ÿ“ โฑ ๐Ÿงฎ File-Size-Age Metrics Exporter

Prometheus exporter providing size and age metrics about files.

โš™๐Ÿ”ง Installation โš™๐Ÿ”ง

Example installation on Debian / Ubuntu:

# required for creating Python virtualenvs:
apt update
apt install -y python3-venv

# create a virtualenv in /opt:
python3 -m venv /opt/fsa-metrics

# update 'pip' and install the 'file-size-age-metrics' package:
/opt/fsa-metrics/bin/pip install --upgrade pip
/opt/fsa-metrics/bin/pip install file-size-age-metrics

๐Ÿƒ Running in foreground mode ๐Ÿƒ

This is mostly relevant for testing configuration settings and checking if the exporter works as expected - to do this either activate the previously created Python environment or call the fsa-metrics script using the full path to that environment.

A configuration file is required for running the metrics exporter. Simply copy the config-example.yaml file to e.g. config.yaml and adjust the settings there. Then run the exporter like this:

fsa-metrics --config config.yaml

The exporter running in foreground can be terminated as usual via Ctrl+C.

๐Ÿ‘Ÿ Running as a service ๐Ÿ‘Ÿ

FIXME!

Known limitations

Currently only a single directory tree can be monitored. Adding support for monitoring several trees with a single process is planned though.

Scalability and resource usage considerations

The exporter is designed with code simplicity as a goal, it's not optimized for efficiency or low resource usage. A few numbers on an average laptop running the exporter on a rather large file tree (not recommended, just for demonstration purposes):

  • Number of files monitored: ~200'000
  • Memory consumption: ~350 MB
  • Metrics collection duration: < 10s