tkNag
2/3/2019 - 10:15 AM

Logstashを通じてtitanic.csvをElasticsearchに投入する

input {
    file {
        path => ["/home/ladmin/titanic/*"]
        sincedb_path => ["/home/ladmin/titanic/sincedb"]
        start_position => "beginning"
        codec => plain {
            charset => "UTF-8"
        }
    }
}

filter {
    csv {
        columns => [PassengerId,Survived,Pclass,Name,Sex,Age,SibSp,Parch,Ticket,Fare,Cabin,Embarked]
    }
}

output {
    elasticsearch {
        index => "passengers"
        document_id => "%{PassengerId}"
    }
}