Advertisement
Guest User

pourantoinelateub

a guest
Mar 25th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. #Fichier de configuration Logstash
  2. input{
  3. file{
  4. #chemin d'accès
  5. path => "/home/nosql/elasticsearch/data/*"
  6. #curseur de lecture à supprimer pour relancer
  7. sincedb_path => "/dev/null"
  8. #lecture depuis le début
  9. start_position => "beginning"
  10. }
  11. }
  12. filter{
  13. #On parse le fichier series
  14. if "shows" in [path] {
  15. csv{
  16. columns => ["show_id","title","description","seasons","episodes","follow_count","creation_year","genres","network"]
  17. skip_empty_rows => true
  18. separator => ","
  19. }
  20. }
  21. else if "episodes" in [path] {
  22. csv{
  23. columns => ["episode_id","show_id","show_title","code","season","episode","title","description","released_timestamp"]
  24. skip_empty_rows => true
  25. separator => ","
  26. }
  27. }
  28. mutate{
  29. remove_field => ["message"]
  30. }
  31.  
  32. }
  33.  
  34. output{
  35. #affichage sur la sortie standard
  36. if "shows" in [path] {
  37. elasticsearch{
  38. index => "shows"
  39. }
  40. }
  41. else if "episodes" in [path] {
  42. elasticsearch{
  43. index => "episodes"
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement