GithubHelp home page GithubHelp logo

ds18b20-prometheus-exporter's Introduction

Dallas DS18B20 Thermometer Prometheus Exporter

A simple http server written in Go which reads and exports the temperature of any sensors found on the Dallas 1-wire bus (e.g. a Raspberry Pi) in varz format during each http response.

Use this to export current temperature data from connected sensors into Prometheus for timeseries analysis.

Usage

env GOOS=linux GOARCH=arm GOARM=6 go build -ldflags="-s -w" -o ds18b20_exporter

Applying labels to Individual Sensors

You most likely want to include extra label metadata to which Prometheus can use to indicate things like sensor name, location etc.

Find the unique serial numbers of your sensors in /sys/bus/w1/devices and include a list of labels like this:

$ ./ds18b20_exporter --port 8000 \
  --prometheus_labels "28-0416a4a474ff=location=lounge,"28-0417713760ff"=location=garden"

Varz Output Format

$ curl http://localhost:8000
temperature_c{location="lounge",sensor="28-0416a4a474ff"} 18.437000
temperature_c{location="garden",sensor="28-0417713760ff"} 12.500000

License

ds18b20-prometheus-exporter is licensed under the MIT License.

ds18b20-prometheus-exporter's People

Contributors

dazzag24 avatar samkalnins avatar

Watchers

 avatar

Forkers

arnoldthebat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.