Skip to content

add Garmin Connect exporter#2998

Merged
ArthurSens merged 2 commits into
prometheus:mainfrom
barnes-c:main
May 21, 2026
Merged

add Garmin Connect exporter#2998
ArthurSens merged 2 commits into
prometheus:mainfrom
barnes-c:main

Conversation

@barnes-c
Copy link
Copy Markdown
Contributor

@barnes-c barnes-c commented May 18, 2026

Hi @RichiH & @juliusv,
I have a exporter which I would like to share with people who are interested in their health data from Garmin.
Hope you dont mind the ping as stated in your CONTRIBUTING.md.

Best regards,
Chris

Some example metrics of the exporter:

curl -s localhost:10043/metrics | grep ^garmin_ | head -60
garmin_activity_calories_total{type="cycling"} 342
garmin_activity_calories_total{type="hiking"} 2402
garmin_activity_calories_total{type="kayaking_v2"} 1292
garmin_activity_calories_total{type="lap_swimming"} 1009
garmin_activity_calories_total{type="resort_skiing"} 11311
garmin_activity_calories_total{type="running"} 4754
garmin_activity_calories_total{type="yoga"} 212
garmin_activity_count{type="cycling"} 1
garmin_activity_count{type="hiking"} 3
garmin_activity_count{type="kayaking_v2"} 2
garmin_activity_count{type="lap_swimming"} 3
garmin_activity_count{type="resort_skiing"} 7
garmin_activity_count{type="running"} 11
garmin_activity_count{type="yoga"} 3
garmin_activity_distance_meters_total{type="cycling"} 10652.8095703125
garmin_activity_distance_meters_total{type="hiking"} 19863.919921875
garmin_activity_distance_meters_total{type="kayaking_v2"} 16700.5400390625
garmin_activity_distance_meters_total{type="lap_swimming"} 4225
garmin_activity_distance_meters_total{type="resort_skiing"} 500387.22265625
garmin_activity_distance_meters_total{type="running"} 64118.269775390625
garmin_activity_distance_meters_total{type="yoga"} 0
garmin_activity_duration_seconds_total{type="cycling"} 4539.14599609375
garmin_activity_duration_seconds_total{type="hiking"} 26278.85791015625
garmin_activity_duration_seconds_total{type="kayaking_v2"} 15533.6337890625
garmin_activity_duration_seconds_total{type="lap_swimming"} 5458.0679931640625
garmin_activity_duration_seconds_total{type="resort_skiing"} 136557.6103515625
garmin_activity_duration_seconds_total{type="running"} 21620.8759765625
garmin_activity_duration_seconds_total{type="yoga"} 3022.873992919922
garmin_activity_last_timestamp_seconds{type="cycling"} 1.775749283e+09
garmin_activity_last_timestamp_seconds{type="hiking"} 1.779010913e+09
garmin_activity_last_timestamp_seconds{type="kayaking_v2"} 1.777894296e+09
garmin_activity_last_timestamp_seconds{type="lap_swimming"} 1.768409449e+09
garmin_activity_last_timestamp_seconds{type="resort_skiing"} 1.774689115e+09
garmin_activity_last_timestamp_seconds{type="running"} 1.778605586e+09
garmin_activity_last_timestamp_seconds{type="yoga"} 1.776274432e+09
garmin_activity_lifetime_count 304
garmin_body_composition_weight_grams_avg 76249.5
garmin_device_count 1
garmin_device_info{device_id="XXX",name="Forerunner 965",status="active",type="Forerunner 965"} 1
garmin_exporter_build_info{branch="",goarch="arm64",goos="darwin",goversion="go1.26.3",revision="dffc6b983076a17c6da844b81d8e0061d8309e2f-modified",tags="unknown",version=""} 1
garmin_goals_active_total 0
garmin_goals_earned_badges_total 50
garmin_heartrate_max_bpm 144
garmin_heartrate_min_bpm 42
garmin_heartrate_resting_bpm 46
garmin_heartrate_seven_day_avg_resting_bpm 50
garmin_hydration_goal_ml 3000
garmin_hydration_intake_ml 0
garmin_intensity_moderate_minutes_total 0
garmin_intensity_vigorous_minutes_total 0
garmin_intensity_weekly_goal_minutes 0
garmin_respiration_avg_waking_bpm 14
garmin_respiration_highest_bpm 22
garmin_respiration_lowest_bpm 9
garmin_scrape_collector_duration_seconds{collector="activities"} 0.401578625
garmin_scrape_collector_duration_seconds{collector="bloodpressure"} 0.410024125
garmin_scrape_collector_duration_seconds{collector="body"} 0.421912375
garmin_scrape_collector_duration_seconds{collector="bodycomposition"} 0.212123834
garmin_scrape_collector_duration_seconds{collector="cycling"} 0.208700833
garmin_scrape_collector_duration_seconds{collector="devices"} 0.438616958

Signed-off-by: Christopher Barnes <noreply@barnes.biz>
Signed-off-by: Christopher Barnes <christopher@barnes.biz>
Copy link
Copy Markdown
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello from the bug scrub!

This is great, we don't have a great official policy of what should go in, but it looks good (e.g. license) and @ArthurSens wanted to try it before merging.

From my POV it looks like a great addition!

Thanks!

@ArthurSens
Copy link
Copy Markdown
Member

ArthurSens commented May 20, 2026

Hey @barnes-c, I'm a huge fan of Garmin, and knowing that you've built an exporter for it is awesome news! I, too, have hacked around with the Garmin Connect app, and some past experience makes me a bit concerned.

Garmin has an official Developers Program, which requires developers to formally apply for and obtain an API key to integrate with apps that require API access. The "unofficial" way is the way you, myself, and several other people have done, which is to authenticate through the Garmin Connect app, and use the internal endpoints that the Mobile App uses. Garmin changes those internal API a lot, which means the Garmin exporter needs to constantly be re-built to keep in sync with Garmin Connect internal APIs.

A Garmin exporter is awesome, and I'll be a happy user, but I'm wondering how you plan to keep it up to date in the long run. It would be a shame to advertise an exporter that doesn't work in a few months 😅

@barnes-c
Copy link
Copy Markdown
Contributor Author

Hi @ArthurSens,
thanks on your interest :)

Garmin changes those internal API a lot, which means the Garmin exporter needs to constantly be re-built to keep in sync with Garmin Connect internal APIs

Yes, I know. I contributed to garth where we already had that problem. Usually this only happens once a year but now with the bigger changes in March garth was deprecated which is why I also build a go-garminconnect client so I dont need to depend on 3rd party libs and own the auth impl

I'm wondering how you plan to keep it up to date in the long run

Im very interested in keeping it running because with this I get to combine work + hobbies. Im a trainer of a local cycling team and use this exporter atm to track my athletes data. TLDR it helps me at my hobbies/job

Hope that answers your questions :)

Copy link
Copy Markdown
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the answers, I'm happy to merge now that you've shared some past experience.

I got it running without problems as well :)

Image

@ArthurSens ArthurSens merged commit 25fba80 into prometheus:main May 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants