All Apps and Add-ons

Garmin Add-On for Splunk Issue

raidercom
Communicator

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...

06-04-2021 17:20:27.939 -0400 INFO Metrics - group=per_source_thruput, series="/opt/splunk/var/log/splunk/ta_garmin_activities.log", kbps=0.005, eps=0.097, kb=0.146, ev=3, avg_age=0.000, max_age=0
06-04-2021 17:21:00.008 -0400 INFO ExecProcessor [895 ExecProcessor] - setting reschedule_ms=299992, for command=/opt/splunk/bin/python3.7 /opt/splunk/etc/apps/TA_garmin/bin/daily_summary.py
2021-06-04 17:21:00,247 INFO Authenticating to Garmin Connect...
06-04-2021 17:21:29.939 -0400 INFO Metrics - group=per_source_thruput, series="/opt/splunk/var/log/splunk/ta_garmin_dailysummary.log", kbps=0.005, eps=0.097, kb=0.146, ev=3, avg_age=0.000, max_age=0
06-04-2021 17:21:29.940 -0400 INFO Metrics - group=per_sourcetype_thruput, series="ta_garmin:log", kbps=0.005, eps=0.097, kb=0.146, ev=3, avg_age=0.000, max_age=0
 
 

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

Labels (3)
0 Karma

Patrick_Peeters
Splunk Employee
Splunk Employee

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.

0 Karma

Patrick_Peeters
Splunk Employee
Splunk Employee

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.

Tags (1)
0 Karma

raidercom
Communicator

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.

0 Karma

token2
Path Finder

Doing a quick beyond compare of the "garminclient.py" found in the add-on and "garminclient.py" found in the garminexprot-master from github.

token2_0-1627874388988.png

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...

token2
Path Finder

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...

0 Karma

erikwie
Path Finder

@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.

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...