Advertisement
Guest User

greedydata doesn't work

a guest
Nov 17th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. what is in gstatus.log
  2. ---------------------------
  3. 2017-11-17 14:16:43.317157 {"volume_summary" : "u" }
  4.  
  5. what is in my configuration
  6. ---------------------------------
  7. input {
  8. exec {
  9. command => "cat /home/anelson/gstatus.log"
  10. interval => 1000
  11. }
  12. }
  13.  
  14. filter {
  15.  
  16. grok {
  17. match => [ "[message]", "%{GREEDYDATA:[allofit]}]" ]
  18. add_tag => []
  19. tag_on_failure => ["garbled-message"]
  20. }
  21.  
  22. }
  23.  
  24. output {
  25. stdout {
  26. codec => rubydebug { metadata => true }
  27. }
  28. }
  29.  
  30.  
  31. when I run the config through logstash:
  32. 2017-11-17T13:38:30,794][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
  33. {
  34. "@timestamp" => 2017-11-17T21:38:30.868Z,
  35. "@version" => "1",
  36. "host" => "ubuntu",
  37. "message" => "2017-11-17 14:16:43.317157 {\"volume_summary\" : \"u\" }\n",
  38. "command" => "cat /home/anelson/gstatus.log",
  39. "tags" => [
  40. [0] "garbled-message"
  41. ]
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement