Skip to content

carlioth/gofit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gofit

Uses the Fitbit API to load data into InfluxDB for displaying data into Grafana for FitOps engineers.

Build Status

Requirements

  • Go 1.8+
  • Fitbit API App ID/Secret (You need to request your own personal App keys in the Fitbit dashboard)
  • InfluxDB 1.2
  • Grafana 4.2+
Todo
  • Get this running as cron job
  • Make timezone and Influxdb variables
  • Use the Fitbit subscriptions API to send metrics in near-realtime when a fitness tracker syncs with Fitbit Servers.
  • Prometheus Fitbit exporter.

Installing

Assuming you have set your $GOPATH https://golang.org/doc/code.html#GOPATH Optionally add $PATH=$PATH:$GOPATH/bin to make gofit command available.

# Install gofit and dependencies
go get -v github.com/timatooth/gofit

Running

Create database fitbit in Influxdb set the callback url in your app (default http://localhost:4000/auth)

export FITBIT_CLIENT_ID=XXXXXX
export FITBIT_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxx
$GOPATH/bin/gofit
# You will be prompted to visit the Fitbit authorisation grant url.
# Assumes you have InfluxDB already running

Screenshot

Step Data

Grafana

Dashboards json exports included for importing into Grafana inside grafana/.

About

Fitbit API data export to InfluxDB

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 97.7%
  • Shell 2.3%