This tool has been forked and updated to import your Peloton workout stats into a local ELK stack. This has been tested on a Mac running ELK inside of a Docker container.
pip install elasticsearch
This script requires you to install Peloton-Client-Library. You will also need to update the ~/.config/pelastic.ini file with your specifics. See Docker Example below...
Pelastic requires a configuration file, where the path (including file) is either pulled from the environment variable PELASTIC_CONFIG
,
or looked for in the hard-coded ~/.config/pelastic.ini
Example on Apple OS X. Open the Terminal.app and enter the following
export PELASTIC_CONFIG=$HOME/pelastic.ini
Example Configuration File
[elastic]
local = yes
host = localhost
port = 9200
id = Your_Elastic_Cloud_ID
username = Your_Elastic_Cluster_Username
password = Your_Elastic_Cluster_Password
Download and install Docker on your machine, then get the ELK container by running:
sudo docker pull sebp/elk
If you're on MacOS there are a couple of requirements for running ELK inside of your image, those are documented here, or you can just run
sudo docker run -e MAX_MAP_COUNT=262145 -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk
Now Elastic Search should be running on localhost:9200, which you can validate by using your browser.
Next you can run with the default configuration by running the following:
export PELASTIC_CONFIG=$PWD/pelastic.ini
python pelastic.py
If everything worked as expected, you should be able to browse to your data using Kibana by going to: http://localhost:5601 Once you've indexed all of your data into Elasticsearh, you should be able to import the Kibana Dashboards provided in the pelastic_dashboards.ndjson by going to http://localhost:5601/app/kibana#/management/kibana/objects then click "Import"
Once complete, you should have something like this: