Prometheus smartthings_exporter

Wanted to let everyone know that I forked some code for an exporter from Marco Paganini and created a standard style Prometheus exporter for smartthings: https://github.com/kadaan/smartthings_exporter

Using this, I can get tons of metrics into Prometheus and the visualize them with Grafana.

4 Likes

@jbaranick Would love to use it, but I’m running into an issue where I’m getting a 401 with an invalid client error and then on retry, getting smartthings_exporter: error: invalid oauth state.

@aaronsachs I’m sure you did, but to verify, you followed the steps here (https://github.com/kadaan/smartthings_exporter#smartthings_exporter-configuration) right?

Yup, I went through the process laid out in the README. Did some more digging and it looks like tracking down the endpoint.groovy file is what got me. Copied from a past commit instead of master. Apologies for the pebkac

@jbaranick out of curiosity, how difficult would it be to add humidity as a value gathered in the exporter? I’m a bit of a golang noob, but willing to give it a whack.

@aaronsachs It shouldn’t be hard. You need to add a metric definition here.. The smartapp can already expose humidity information.

@jbaranick I’ve opened a PR to add humidity as a metric and have it working on a local release.

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.