switchbot-prometheus-exporter

command module
v0.0.0-...-339c4f4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 11 Imported by: 0

README

switchbot-prometheus-exporter

English

about this

This is prometheus exporter which collects temparetures and humidity from SwitchBot Thermometer and Hygrometeror.

English docs will be opened soon.

Requirements
How To Use
Thanks

Japanese - 日本語

about

これは SwitchBot 温湿度計からデータを集める Prometheus Exporter です。

Requirements

この exporter を用いて温湿度情報を Prometheus に収集させるためには最低限以下の用意が必要です。

使い方

デフォルトでは 8080 番の /metricsにてメトリクスを公開します。

いくつかの環境変数を設定することが必須です。また特定の環境変数を設定することにより振る舞いを変更することができます。

TOKEN

[required]

SwitchBot の OPEN API TOKEN を渡します。

取得方法は公式 API ドキュメントの Getting startedを参考にしてください。

DEVICE_ID

[required]

監視対象のデバイス ID です。

非公式ですがデバイスの BLE MAC アドレスを英大文字と数字で構成される 12 桁で表現したものとなっています。 例えば BLE mac アドレスが00:00:5e:00:53:00であれば00005E005300となります。

FETCH_INTERVAL

[optional, default=5m]

SwitchBot API から情報を取得する間隔を指定します。フォーマットはこのメソッドの仕様に従います。

PORT

[optional, default=8080]

メトリクスを公開するポートを指定します。

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