Skip to content

Health data scraper that turns the data into prometheus metrics and grafana annotations.

License

Notifications You must be signed in to change notification settings

lesykm/healthstats-collector

 
 

Repository files navigation

healthstats-collector

Health stats collector downloads health data from garmin connect website, turn them into prometheus metrics, and push the metrics to prometheus pushgateway, which exposes a /metrics endpoint, and can be scraped by prometheus.

Special thank you goes to tcgoetz/GarminDB. The garmin connect scraper in this repo was largely inspired by GarminDB.

Grafana dashboard built from those metrics:

healthstats-dashboard

activities-as-annotations

Getting started

Very cool! What do I need to generate a pretty dashboard like that??

Glad you asked, you will need:

  • garmin connect account
  • promethues
  • pushgateway
  • grafana
  • docker
  • docker-compose

You will need to rename .env.example to .env, and fill in the actual values.

To run this tool, you have two options:

  • single run: make
  • cron job: make cron

PROFIT!

List of metrics

Metric name Description
weight_total Body weight in KG
weight_body_fat Body fat in %
weight_bone_mass Bone mass in KG
weight_bmi BMI
weight_body_water Body water in %
weight_muscle_mass Muscle mass in KG
resting_heart_rate Resting heart rate
heart_rate_resting Resting heart rate
heart_rate_min Minimum heart rate
heart_rate_max Maximum heart rate
steps Total steps
steps_daily_goal Daily step goal
distance_meters Total distance in meters
active_seconds Seconds in movement
sedentary_seconds Seconds in sedentary position
calories Total calories
calories_active Active calories
calories_resting Resting calories
intensity_minutes_moderate Minutes in moderate intensity activities
intensity_minutes_vigorous Minutes in vigorous intensity activities
floors_ascended Floors ascended
floors_ascended_meters Floors ascended in meters
floors_descended Floors descended
floors_descended_meters Floors descended in meters
sleep_time_sec Total sleep time in seconds
sleep_deep_sec Deep sleep time in seconds
sleep_light_sec Light sleep time in seconds
sleep_awake_sec Sleep awake time in seconds

About

Health data scraper that turns the data into prometheus metrics and grafana annotations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.6%
  • Shell 7.0%
  • Makefile 2.6%
  • Dockerfile 1.8%