Simple Python I/O statistics exporter for Prometheus on FreeBSD
Project description
Simple Python I/O statistic exporter for Prometheus on FreeBSD
This is a simple iostat
exporter as provider for the Prometheus time series database
and monitoring system written in Python. It uses
the prometheus-client Python
package to do the main work of running the webservice and managing the gauges.
It's just a wrapper that periodically calls iostat
to gather information
about disk I/O which is then provided on the specified TCP port where it's
collected by Prometheus at the specified scrape interval. This scraper
uses iostat
to query the parameters thus it only works on FreeBSD, not on Linux.
Since this exporter scrapes the output of the CLI tools it may break with any software update and might only work with particular versions of those tools. It has been tested on:
- FreeBSD 11.2
- FreeBSD 12.2
- FreeBSD 12.3
Exported metrics
For each disk the following parameters are exposed (using the device filename as label):
- Reads per second (
iostat_rs
) - Writes per second (
iostat_ws
) - Kilobytes read per second (
iostat_krs
) - Kilobytes written per second (
iostat_kws
) - Milliseconds per read (
iostat_msr
) - Milliseconds per write (
iostat_msw
) - Milliseconds per operation (
iostat_mso
) - Milliseconds per transaction (
iostat_mst
) - Queue length (
iostat_qlen
) - Busy percentage (
iostat_busy
)
Installation
The package can either be installed from PyPI
pip install iostatexporter-tspspi
or form a package downloaded directly from the tar.gz
or whl
from
the releases:
pip install iostatexporter-tspspi.tar.gz
Usage
usage: iostatexporter [-h] [-f] [--uid UID] [--gid GID] [--chroot CHROOT]
[--pidfile PIDFILE] [--loglevel LOGLEVEL]
[--logfile LOGFILE] [--port PORT] [--interval INTERVAL]
Iostat exporter daemon
optional arguments:
-h, --help show this help message and exit
-f, --foreground Do not daemonize - stay in foreground and dump debug
information to the terminal
--uid UID User ID to impersonate when launching as root
--gid GID Group ID to impersonate when launching as root
--chroot CHROOT Chroot directory that should be switched into
--pidfile PIDFILE PID file to keep only one daemon instance running
--loglevel LOGLEVEL Loglevel to use (debug, info, warning, error,
critical). Default: error
--logfile LOGFILE Logfile that should be used as target for log messages
--port PORT Port to listen on
--interval INTERVAL Interval in seconds in which data is gathered
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file iostatexporter-tspspi-0.0.1.tar.gz
.
File metadata
- Download URL: iostatexporter-tspspi-0.0.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60b742f481f6199a6da5fa1f723ed2ecb029eda21e645360847f552453a0fe10 |
|
MD5 | 3073df6c0780026eb6828482f2a5553c |
|
BLAKE2b-256 | 5fb7fdfe1b4b8459ddd29c131eda9f9e2efe5eefa3c1603425cf7e622440fa7e |
File details
Details for the file iostatexporter_tspspi-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: iostatexporter_tspspi-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c533683ae5bee2b79083b689e6db3dd610f3349a0c18f733c819d3d4aa2997e |
|
MD5 | a74f17ccbe155295a40f9ca24c90b053 |
|
BLAKE2b-256 | d3bf223fe0a9e7641d2ea75434ef026d8406693ad3192d11302aa5c35a351dd5 |