How convert timestamp in date

Hello,Im new user for logstash and i need help .
i want use 'timestamp' column in my csv but its not work .
If you can help me .
Thanks

input {
file{
path =>"/Users/itsgood/Desktop/money/coins_btc.csv"
start_position =>beginning
sincedb_path=>"dev/null"
}
file{
path =>"/Users/itsgood/Desktop/money/coins_etc.csv"
start_position =>beginning
sincedb_path=>"dev/null"
}
}
filter{
csv{
separator => ";"
columns =>
["price_btc","volume_24h_btc","market_cap_btc","percent_change_1h_btc","percent_change_24h_btc","percent_change_7d_btc","timestamp_btc","price_eth","volume_24h_eth","market_cap_eth","percent_change_1h_eth",
"percent_change_24h_eth","percent_change_7d_eth",
timestamp_eth"]
}
date {
match => [ "timestamp","MMM-dd-yyyy HH:mm:ss" ]
target => "timestamp_btc"
}

}
output {
stdout { codec => rubydebug }
elasticsearch {
hosts => ["127.0.0.1:9200"]
index => "csv_index"
}
}

match => [ "timestamp","MMM-dd-yyyy HH:mm:ss" ]

This tells the date filter to parse the timestamp field. AFAICT you don't have a field by that name. Did you mean timestamp_btc?

I test that but ,its not work .
My timestamp = 1527433633

Okay, but that's not a timestamp in MMM-dd-yyyy HH:mm:ss format. Try UNIX instead.

1 Like

Its good now,thanks you very much .you save me

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.