Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Fichier de configuration Logstash
- input{
- file{
- #chemin d'accès
- path => "/home/nosql/elasticsearch/data/*"
- #curseur de lecture à supprimer pour relancer
- sincedb_path => "/dev/null"
- #lecture depuis le début
- start_position => "beginning"
- }
- }
- filter{
- #On parse le fichier series
- if "shows" in [path] {
- csv{
- columns => ["show_id","title","description","seasons","episodes","follow_count","creation_year","genres","network"]
- skip_empty_rows => true
- separator => ","
- }
- }
- else if "episodes" in [path] {
- csv{
- columns => ["episode_id","show_id","show_title","code","season","episode","title","description","released_timestamp"]
- skip_empty_rows => true
- separator => ","
- }
- }
- mutate{
- remove_field => ["message"]
- }
- }
- output{
- #affichage sur la sortie standard
- if "shows" in [path] {
- elasticsearch{
- index => "shows"
- }
- }
- else if "episodes" in [path] {
- elasticsearch{
- index => "episodes"
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement