Categorygithub.com/moikot/smartthings-metrics
modulepackage
0.1.1
Repository: https://github.com/moikot/smartthings-metrics.git
Documentation: pkg.go.dev

# README

SmartThings metrics

ci docker
A micro-service that provides SmartThings metrics to Prometheus.

Run

For this service to have access to SmartThings API you need to provide it with a personal access token (PAT). To generate a PAT do the following:

  1. Open SmartThings Personal access tokens page.
  2. Click "GENERATE NEW TOKEN" button.
  3. Give it a name and enable "Devices/List all devices" and "Devices/See all devices" scopes.
  4. Click "GENERATE TOKEN" button.

Run as a standalone app

Prerequisites:

$ go get github.com/moikot/smartthings-metrics
$ smartthings-metrics -token [Smarthings-API-token]

Run as a Docker container

Prerequisites:

$ docker run -d --rm -p 9153:9153 moikot/smartthings-metrics -token [Smarthings-API-token]
$ curl localhost:9153/metrics

Deploy to a Kubernetes cluster

Prerequisites:

SmartThing metrics service is installed to Kubernetes via its Helm chart.

$ helm repo add moikot https://moikot.github.io/helm-charts
$ helm install smartthings-metrics moikot/smartthings-metrics --create-namespace --names
pace smartthings --set token=[Smarthings-API-token] 

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author