prometheus-sensor-exporter

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2025 License: ISC Imports: 15 Imported by: 0

README

prometheus-sensor-exporter

prometheus-sensor-exporter is a Prometheus exporter for temperature and humidity sensors.

Supported sensors

Supported flags

  • address: I²C address (uint8)
  • bus: I²C bus number (int)
  • repeatability: low, medium, or high (only SHT sensors)
  • temp_offset: fixed temperature offset in °C to add (float64)
  • humidity_offset: fixed humidity offset in percent to add (float64)

Example usage

prometheus-sensor-exporter BME280,bus=0 SHT35,bus=1,address=0x45

Build

go get
go build -ldflags "\
    -X github.com/prometheus/common/version.Branch=$(git branch --show-current) \
    -X github.com/prometheus/common/version.Revision=$(git rev-parse --short HEAD) \
    -X github.com/prometheus/common/version.Version=0.1.0"

Test

go test -coverprofile=coverage.out -v
go tool cover -html=coverage.out -o coverage.html

Formatting

goimports -w .
go fmt

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL