Skip to content

soerenuhrbach/egym-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VisualStudio Marketplace Prometheus Exporter

Build GoDoc GoReportCard

Prometheus exporter to scrape metrics from egym.

Usage

Using release binaries

You can download the latest version of the binary built for your architecture here:

You can run it using the following example:

./egym_exporter -egym-brand "<brand>" -egym-username "<username>" -egym-password "<password>"

Docker

The exporter is also available as a Docker image. You can run it using the following example and pass configuration environment variables:

docker run \
  -e 'EGYM_BRAND=<brand>' \
  -e 'EGYM_USERNAME=<brand>' \
  -e 'EGYM_PASSWORD=<password>' \
  -p 9391:9391 \
  ghcr.io/soerenuhrbach/egym-exporter:latest

Scrape metrics

Once the exporter is running, you can configure your collector to scrape the metrics.

Adjust your prometheus.yml configuration to let it scrape the exporter like this:

scrape_configs:
  - job_name: 'egym'
    static_configs:
      - targets: ['localhost:9391']

Available configurations

Configuration name Description Required Argument Environment variable Default
Extensions Comma-separated list of extensions that should be scraped Required extensions EXTENSIONS -
Metric path Port to be used for the exporter false metricsPath METRICSPATH /metrics
Port Port to be used for the exporter false port PORT 9391
Binding Address Address to be used for the exporter false bindAddress BINDADDRESS 0.0.0.0

Examples with all possible configurations:

./egym_exporter \
  -egym-brand "<brand>" \ 
  -egym-username "<username>" \
  -egym-password "<password>" \
  -metricsPath "/metrics" \
  -port 9391 \
  -bindAddress 0.0.0.0

or using docker:

docker run \
  -e 'EGYM_BRAND=<brand>' \
  -e 'EGYM_USERNAME=<brand>' \
  -e 'EGYM_PASSWORD=<password>' \
  -e 'METRICSPATH=/metrics' \
  -e 'PORT=9391' \
  -e 'BINDADDRESS=0.0.0.0' \
  -p 9391:9391 \
  ghcr.io/soerenuhrbach/egym-exporter:latest

Available metrics

Metric Description
egym_bio_age_total Total bio age
egym_bio_age_cardio Cardio bio age
egym_bio_age_flexibility Flexibility bio age
egym_bio_age_metabolic Metabolic bio age
egym_bio_age_muscles Total muscles bio age
egym_bio_age_muscles_core Core muscles bio age
egym_bio_age_muscles_lower_body Lower body muscles bio age
egym_bio_age_muscles_upper_body Upper body muscles bio age
egym_activity_points Amount of activity points within the current period
egym_activity_points_goal Amount of activity points to reach the next activity level
egym_activity_maintain_points Amount of required activity points to maintain the activity level
egym_body Various metrics about the body like BMI, muscles or fat.
egym_strength Strength metrics about various muscles and muscle groups.
egym_flexibility Flexibility metrics about different body parts like neck or hips.
egym_muscle_imbalance Proportions and (im)balances of different muscle pairs.
egym_exercise_activity_points Collected activity points of a specific exercise
egym_exercise_activity_distance Distance left behind with the specific exercise
egym_exercise_activity_duration Duration of a specific exercise
egym_exercise_activity_calories Burned calories with a specific exercise
egym_exercise_average_speed Average speed within a specific exercise
egym_exercise_sets Number of sets within a specific exercise
egym_exercise_reps number of reps over all sets of a specific exercise
egym_exercise_weight_total Total weight across all reps of all sets of the exercise

Release Notes

0.7.0

Added metrics about exercises.

0.6.0

Added muscle imbalance metrics.

0.5.0

Added flexibility metrics about different body parts like neck or hips.

0.4.0

Added strength metrics about various muscles and muscle groups.

0.3.0

Added body metrics

0.2.0

Added metrics about the users activity level

0.1.0

Initial release

MIT LICENSE

About

EGYM Prometheus Exporter to scrape fitness metrics

Resources

License

Stars

Watchers

Forks

Packages