Hi,
used your example data i used
index=temp sourcetype=distance |
streamstats current=f last(Longitude) as lastLongitude last(Latitude) as lastLatitude |
eval lastlocation= lastLatitude + " , " + lastLongitude |
eval currlocation = Latitude + " , " + Longitude |
search lastlocation=* AND currlocation=* |
haversine originField=lastlocation currlocation outputField=distance |
table _time lastlocation currlocation distance
output is:
_time lastlocation currlocation distance
2015-04-19 13:33:00 52.444 , 17.444 52.333 , 17.333 14.459705438259151
2015-04-19 13:30:00 52.333 , 17.333 52.222 , 17.222 14.469574885347384
2015-04-19 13:27:00 52.222 , 17.222 52.111 , 17.111 14.47944752893998
Cheers,
Andreas
... View more