Prometheus exporter for the DHT11 sensor.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
finga 9a7f202f85 Create the exporter 5 months ago
.cargo Create the exporter 5 months ago
debian Create the exporter 5 months ago
src Create the exporter 5 months ago
.gitignore Create the exporter 5 months ago
.woodpecker.yml Create the exporter 5 months ago
Cargo.lock Create the exporter 5 months ago
Cargo.toml Create the exporter 5 months ago
README.md Create the exporter 5 months ago

README.md

Exporter for the DHT11 sensor status-badge

A Prometheus exporter for the DHT11 sensor.

Build

Cargo, the Rust package manager, is used to build this project.

Same architecture as system

Compile it for the same architecture as the build system:

cargo build --release

Cross-compile for amd64 (recent RaspberryPi)

Cross-compile it for the amd64 architecture:

PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu cargo build --target aarch64-unknown-linux-gnu --release

Debian

To build a package for Debian, Raspbian, and so on, cargo-deb can be used.

The package comes with an automatically started and enabled systemd service unit which can be configured via /etc/default/dht11-exporter.

Same architecture as system

Build a deb package for the same architecture as the build system:

cargo deb

Cross-compile for amd64 (recent RaspberryPi)

Build a deb package for the amd64 architecture:

PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu cargo deb --target aarch64-unknown-linux-gnu

Usage

USAGE:
    dht11-exporter [OPTIONS]

OPTIONS:
    -a, --address <ADDRESS>    The IPv4 or IPv6 address where the metrics are served [default:
                               127.0.0.1]
    -g, --gpio <GPIO>          The GPIO pin of the DHT11 data line [default: 4]
    -h, --help                 Print help information
    -p, --port <PORT>          The port where the metrics are served [default: 9112]
    -V, --version              Print version information