Getting Data In

Ingest GPX Files

genesiusj63
Explorer

Hello,

I'm using an old copy of a Windows-based running tracking application. The mapping function no longer works. The app can export the tracks in GPX format. I would like to ingest GPX files into Splunk and build reports, dashboards, etc. But GPX is not a native file type for Splunk.

I followed the instructions from this site Splunk My Ride! (and my Run and Swim) Part 1 
but results were a single event.

Thanks in advance.
God bless,

Genesius

 

Labels (2)
0 Karma
1 Solution

Richfez
SplunkTrust
SplunkTrust

Do you have a sample of the data and your config so far?

For the data, we probably only need, like, two or three "individual items" but you'll have to use your thinking cap to decide what 2-3 of those events should look like and copy them out of the gpx file.

Specifically, I'll bet it's the BREAK_ONLY_BEFORE = <trkpt option that's not right.

 

View solution in original post

Richfez
SplunkTrust
SplunkTrust

Do you have a sample of the data and your config so far?

For the data, we probably only need, like, two or three "individual items" but you'll have to use your thinking cap to decide what 2-3 of those events should look like and copy them out of the gpx file.

Specifically, I'll bet it's the BREAK_ONLY_BEFORE = <trkpt option that's not right.

 

genesiusj63
Explorer

Rich,

My apologies for my delay in replying. I am a Splunk Admin in my regular job, and have been busy on that end. I downloaded Splunk Free for personal, limited use. 

I uploaded a new GPX file yesterday, and by some strangeness(?) it worked. I did not change any configurations, etc. 

Now that I have a table of time, lat, lon, and ele I want to calculate the distance between these waypoints, and map them out. I found the haversine app from comments on the forum, and am unable to install. See this new forum post.

Need Help to Install a Splunkbase App in Splunk Free 

Thanks for your help, it is much appreciated.

Safe and healthy to you and yours.

God bless and Happy Thanksgiving,

Genesius

0 Karma

Richfez
SplunkTrust
SplunkTrust

You should probably ask a new question, since this answer isn't really part of the original.

But why not build your own?

| makeresults | eval lat1=45, lon1=-90, lat2=39, lon2=-84
| eval earth_diameter_km = 6371
| eval lat1_rad = lat1 * (3.14159 / 180), lat2_rad = lat2 * (3.14159 / 180), lon1_rad = lon1 * (3.14159 / 180), lon2_rad = lon2 * (3.14159 / 180)
| eval diff_rad_lat = lat1_rad - lat2_rad
| eval diff_rad_lon = lon1_rad - lon2_rad
| eval calc1 = pow(sin(diff_rad_lat/2),2) + cos(lat1_rad) * cos(lat2_rad) * pow(sin(diff_rad_lon),2)
| eval calc2 = atan2(sqrt(calc1), sqrt(1-calc1))
| eval distance_km = earth_diameter_km * calc2

That's a run-anywhere that roughly calculates the distance between my house and my parent's house.  It's based loosely on this:

https://stackoverflow.com/questions/27928/calculate-distance-between-two-latitude-longitude-points-h...

But understanding what I wrote there is an exercise for the reader.  🙂

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...