Prometheus exporter for the MightyOhm Geiger Counter.
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 54abe207e0 Release first version 5 months ago
.cargo Read from hardcoded serial port 6 months ago
debian Use `cargo-deb` to build a Debian package 5 months ago
src Add command line arguments 6 months ago
.gitignore Read from hardcoded serial port 6 months ago
.woodpecker.yml ci: Remove redundant CI jobs 5 months ago
Cargo.lock Release first version 5 months ago
Cargo.toml Release first version 5 months ago
README.md Extend `Cargo.toml` and `Readme.md` 5 months ago

README.md

Exporter for the MightyOhm Geiger Counter status-badge

A Prometheus exporter for the MightyOhm Geiger Counter.

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/mightyohm-gc-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:
    mightyohm-gc-exporter [OPTIONS]

OPTIONS:
    -a, --address <ADDRESS>            The IPv4 or IPv6 address where the metrics are served
                                       [default: 127.0.0.1]
    -b, --baud-rate <BAUD_RATE>        The baudrate of the serial connection [default: 9600]
    -h, --help                         Print help information
    -p, --port <PORT>                  The port where the metrics are served [default: 9111]
    -s, --serial-port <SERIAL_PORT>    The port of the serial device, usually in '/dev/...'
                                       [default: /dev/serial0]
    -t, --timeout <TIMEOUT>            Timeout of the serial connection in ms [default: 1000]
    -V, --version                      Print version information