Hi:
I was trying to get the app Garmin Add-On for Splunk (https://splunkbase.splunk.com/app/5035/) working on my dockerized instance. I followed the entire setup procedure without issue, but when the cron tried to run, it doesn't appear to post any data into the index.
I upped the run interval, for one of the inputs to run at 1-59/5 * * * * and the other at */5 * * * *
When I check the _internal index to see what it is doing, the only events I can see are:
06-04-2021 17:20:00.000 -0400 INFO ExecProcessor [895 ExecProcessor] - setting reschedule_ms=300000, for command=/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/TA_garmin/bin/activities.py
2021-06-04 17:20:00,262 INFO Authenticating to Garmin Connect...
I tried running it manually within the container with:
sh-4.4$ export LD_LIBRARY_PATH=/opt/splunk/lib/:$LD_LIBRARY_PATH
sh-4.4$ /opt/splunk/bin/python3.7 /opt/splunk/etc/apps/TA_garmin/bin/activities.py
but, that just hangs waiting forever, doing something.
Please let me know if I opened this in the wrong area.
Any thoughts on things I could try?
Thanks
-Jeff
I'm the developer of the app. I stopped using Garmin so wasn't aware it stopped working until a colleague mentioned it and I found this issue. I will update the app and release a new version and publish it on GitHub shortly, stay tuned.
In the future you can then use GitHub's pull requests or issues to flag items like these.
I uploaded the source code to https://github.com/bakermat/ta_garmin. I was hoping it was just a matter of updating the `garminexport` package to the latest version (0.4.0) but even with that I'm still getting an authentication error.
I see the upstream package also has reports of authentication issues, so perhaps Garmin changed the authentication again. Unfortunately I don't have the bandwidth to look at this further, however I welcome pull requests. In the meantime you can use the Strava app as a workaround as suggested if you're only after activities.
I did put some dummy data into the index, so I know that the index does work. I am confused about the metrics, because that leads me to believe that the script is pulling data, just not indexing it for some reason. I cannot see the file within the container that is being referenced by the metrics, nor any non-dummy data in the index. Really confused as to what is happening.
Doing a quick beyond compare of the "garminclient.py" found in the add-on and "garminclient.py" found in the garminexprot-master from github.
There are a number of other changes as well, but I'm thinking between the time of this add-on being made and the last update to garminexport, there has been a change with the REST APIs authentication.
Going to garminexport's Issues:
https://github.com/petergardfjall/garminexport/issues
June 12 Authentication failure
I'm tempted to just copy over the python into the TA but I'm sure I wreck something...
I ran into what might have been the same issue as you. I went to var/log/ta_garmin_activities.log and it shows both what index=_internal showed:
"Authenticating to Garmin Connect..."
But then additional information
"ERROR authentication failures: did you enter the valid credentials?"
I tripple checked creds. I think there is an issue with the TA. Googling about Garmin API issues it looks like Garmin changes things from time to time and it breaks many a github python project's authentication (this TA uses a python project from github to grab the .fit files).
I'm not technical enough to try and fix this or build a TA from scratch. Wish I was as its a real bummer this isn't working. A big part of getting my watch was the thought I could Splunk it...
@token2 wrote:A big part of getting my watch was the thought I could Splunk it...
I'm not able to get the Garmin Add-On for Splunk to work either, same problem as the rest of you.
But there is sort of a workaround.
The Strava for Splunk app (https://splunkbase.splunk.com/app/4755) does work with Splunk, by connecting the Garmin account with the Strava Account to sync activities fra Garmin to Strava you can get it into Splunk. but ut will only give you the activites, if it's the daily summaries you want this won't do it.