Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. input {
  2. file {
  3. path => [ "/data/minecraft/*/logs/latest.log" ]
  4. tags => ["minecraft"]
  5. }
  6. }
  7.  
  8. filter {
  9. if "minecraft" in [tags] {
  10. grok {
  11. match => [ "message", "\A\[%{TIME:timestamp}] \[(?<originator>[^\/]+)?/%{LOGLEVEL:level}]: %{GREEDYDATA:message}\Z" ]
  12. overwrite => [ "message" ]
  13. break_on_match => false
  14. }
  15.  
  16. grok {
  17. match => [ "message", "\AUUID of player %{USERNAME} is %{UUID}\Z" ]
  18. add_tag => [ "player", "uuid" ]
  19. }
  20.  
  21. grok {
  22. match => [ "message", "\A(?<player>[a-zA-Z0-9_]+)\[/%{IPV4:ip_address}:%{POSINT}\] logged in with entity id %{POSINT:entity_id} at \(\[(?<world>[a-zA-Z]+)\](?<pos>[^\)]+)\)\Z" ]
  23. add_tag => [ "player", "join" ]
  24. }
  25.  
  26. grok {
  27. match => [ "message", "^(?<player>[a-zA-Z0-9_]+) has just earned the achievement \[(?<achievement>[^\[]+)\]$" ]
  28. add_tag => [ "player", "achievement" ]
  29. }
  30.  
  31. grok {
  32. match => [ "message", "^(?<player>[a-zA-Z0-9_]+) left the game$" ]
  33. add_tag => [ "player", "part" ]
  34. }
  35.  
  36. grok {
  37. match => [ "message", "^<(?<player>[a-zA-Z0-9_]+)> .*$" ]
  38. add_tag => [ "player", "chat" ]
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement