MacroPower / wakatime_exporter

Exports Prometheus metrics from Wakatime.
Apache License 2.0
93 stars 9 forks source link

Add support for "Goals" metrics #2

Closed MacroPower closed 4 years ago

MacroPower commented 4 years ago

https://wakatime.com/developers#goals

# HELP wakatime_goal_info Information about the goal.
# TYPE wakatime_goal_info gauge
wakatime_goal_info{id="69e0febc-923e-4f67-b347-8ed4623823f0",ignore_zero_days="1",is_enabled="1",is_inverse="0",is_snoozed="0",is_tweeting="0",name="Code 1 hr per day in Go"} 1
wakatime_goal_info{id="b642abef-14eb-47c3-ae46-d61a46efe78c",ignore_zero_days="1",is_enabled="1",is_inverse="0",is_snoozed="0",is_tweeting="0",name="Code 1 hr per day in Go, Python"} 1
wakatime_goal_info{id="c3b32c8c-8d4f-44e2-9859-2aa20737f12c",ignore_zero_days="1",is_enabled="1",is_inverse="0",is_snoozed="0",is_tweeting="0",name="Code 1 hr per day"} 1
wakatime_goal_info{id="d8640746-23e6-4553-812a-716efca86020",ignore_zero_days="1",is_enabled="1",is_inverse="0",is_snoozed="0",is_tweeting="0",name="Code 6 hrs per week"} 1
# HELP wakatime_goal_progress_seconds_total Progress towards the goal.
# TYPE wakatime_goal_progress_seconds_total counter
wakatime_goal_progress_seconds_total{delta="day",id="69e0febc-923e-4f67-b347-8ed4623823f0",name="Code 1 hr per day in Go",type="coding"} 3040.641039
wakatime_goal_progress_seconds_total{delta="day",id="b642abef-14eb-47c3-ae46-d61a46efe78c",name="Code 1 hr per day in Go, Python",type="coding"} 3040.641039
wakatime_goal_progress_seconds_total{delta="day",id="c3b32c8c-8d4f-44e2-9859-2aa20737f12c",name="Code 1 hr per day",type="coding"} 3040.641039
wakatime_goal_progress_seconds_total{delta="week",id="d8640746-23e6-4553-812a-716efca86020",name="Code 6 hrs per week",type="coding"} 69270.019606
# HELP wakatime_goal_seconds The goal.
# TYPE wakatime_goal_seconds gauge
wakatime_goal_seconds{delta="day",id="69e0febc-923e-4f67-b347-8ed4623823f0",name="Code 1 hr per day in Go",type="coding"} 3600
wakatime_goal_seconds{delta="day",id="b642abef-14eb-47c3-ae46-d61a46efe78c",name="Code 1 hr per day in Go, Python",type="coding"} 3600
wakatime_goal_seconds{delta="day",id="c3b32c8c-8d4f-44e2-9859-2aa20737f12c",name="Code 1 hr per day",type="coding"} 3600
wakatime_goal_seconds{delta="week",id="d8640746-23e6-4553-812a-716efca86020",name="Code 6 hrs per week",type="coding"} 21600
MacroPower commented 4 years ago

Closed in https://github.com/MacroPower/wakatime_exporter/commit/0880a39e252a0406dec52481ddca3a758c767a5e