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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址