Created
July 22, 2017 02:07
-
-
Save markwalkom/acc34ad4319965f06b5126a816086aa0 to your computer and use it in GitHub Desktop.
Logstash config to process PayPal transaction history (downloaded in CSV)
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
input { | |
stdin {} | |
} | |
filter { | |
csv { | |
columns => ["Date","Time","Time Zone","Name","Type","Status","Currency","Gross","Fee","Net","From Email Address","To Email Address","Transaction ID","Counterparty Status","Shipping address","Address Status","Item Title","Item ID","Shipping and Handling Amount","Compensation Amount","GST","Option 1 Name","Option 1 Value","Option 2 Name","Option 2 Value","Auction Site","Buyer ID","Item URL","Closing Date","Escrow ID","Invoice ID","Reference Txn ID","Invoice Number","Custom Number","Quantity","Receipt ID","Balance","Contact Phone Number"] | |
add_field => [ "timestamp", "%{Date} %{Time}" ] | |
remove_field => [ "Date", "Time", "Time Zone" ] | |
} | |
date { | |
match => [ "timestamp", "dd/MMM/yyyy HH:mm:ss" ] | |
timezone => "Australia/Sydney" | |
remove_field => [ "timestamp" ] | |
} | |
mutate { | |
convert => { | |
"Gross" => integer | |
"Net" => integer | |
"GST" => integer | |
"Shipping and Handling Amount" => integer | |
"Fee" => integer | |
"Balance" => integer | |
"Quantity" => integer | |
} | |
} | |
} | |
output { | |
elasticsearch { | |
hosts => ["http://localhost:9201"] | |
user => "elastic" | |
password => "changeme" | |
index => "paypal-fy-%{yyyy}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Improvements;
Authorisation
+PayPal Express Checkout Payment Sent
into a single transaction