Last active
June 29, 2018 16:55
-
-
Save LukeMurphey/005552b508a6f6b6bc8d37e04f1d6073 to your computer and use it in GitHub Desktop.
A Splunk snippet for examining how much you spend on Amazon per year downloaded from https://www.amazon.com/gp/b2b/reports #splunk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source="01-Jan-2006_to_29-Jun-2018.csv" | |
| eval _time=strptime('Shipment Date',"%m/%d/%y") | |
| rex field="Purchase Price Per Unit" "(?<price>[0-9.]+)" | |
| rex field="Shipment Date" "[0-9][0-9]/[0-9][0-9]/(?<year>([0-9][0-9]))" | |
| stats sum(price) as spent by year |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment