#freebsd #prometheus-exporter #prometheus #prometheus-metrics #geom #monitoring #floating-point

app freebsd-geom-exporter

Proemtheus exporter for FreeBSD's GEOM device statistics

2 releases

0.1.1 Apr 18, 2024
0.1.0 Apr 17, 2024

#195 in Hardware support

Download history 11/week @ 2024-07-22 10/week @ 2024-07-29 10/week @ 2024-08-05 8/week @ 2024-08-12 7/week @ 2024-08-19 2/week @ 2024-08-26 1/week @ 2024-09-02 8/week @ 2024-09-09 10/week @ 2024-09-16 22/week @ 2024-09-23 19/week @ 2024-09-30 18/week @ 2024-10-07 15/week @ 2024-10-14 8/week @ 2024-10-21 12/week @ 2024-10-28 23/week @ 2024-11-04

60 downloads per month

BSD-2-Clause

36KB
628 lines

FreeBSD GEOM statistics exporter for Prometheus

Build Status Crates.io FreeBSD port

Overview

The is a Prometheus exporter for FreeBSD's GEOM statistics. These are the same underlying statistics reported by gstat(8).

In terms of accuracy, accessing these metrics via Prometheus is less accurate than using gstat directly, for two reasons:

  • Prometheus records all metrics as 64-bit floating point values. But gstat uses devstat(3), which uses long double internally.

  • Prometheus timestamps data points according to the time that they are ingested into the database. So computing rates with Prometheus will suffer due to the jitter involved in ingesting the data. But devstat(3) uses timestamps that are recorded by the kernel at the moment the kernel generates a devstat snapshot. So those rate computations are much more accurate.

Usage

cargo install freebsd-geom-exporter
daemon geom-exporter

Note that the FreeBSD port of this exporter (net-mgmt/geom-exporter) comes with an rc(8) service script.

Minimum Supported Rust Version (MSRV)

freebsd-geom-exporter does not guarantee any specific MSRV. Rather, it guarantees compatibility with the oldest rustc shipped in the latest quarterly branch of the FreeBSD ports collection.

License

freebsd-geom-exporter is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

Dependencies

~7–15MB
~199K SLoC