Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. input {
  2. syslog {
  3. port => 5000
  4. type => "docker"
  5. }
  6. }
  7.  
  8. filter {
  9. grok {
  10. match => { "message" => "%{SYSLOG5424PRI}%{NONNEGINT:ver} +(?:%{TIMESTAMP_ISO8601:ts}|-) +(?:%{HOSTNAME:service}|-) +(?:%{NOTSPACE:containerName}|-) +(?:%{NOTSPACE:proc}|-) +(?:%{WORD:msgid}|-) +(?:%{SYSLOG5424SD:sd}|-|) +%{GREEDYDATA:msg}" }
  11. }
  12. syslog_pri { }
  13. date {
  14. match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
  15. }
  16. mutate {
  17. remove_field => [ "message", "priority", "ts", "severity", "facility", "facility_label", "severity_label", "syslog5424_pri", "proc", "syslog_severity_code", "syslog_facility_code", "syslog_facility", "syslog_severity", "syslog_hostname", "syslog_message", "syslog_timestamp", "ver" ]
  18. }
  19. mutate {
  20. remove_tag => [ "_grokparsefailure_sysloginput" ]
  21. }
  22. mutate {
  23. gsub => [
  24. "service", "[0123456789-]", ""
  25. ]
  26. }
  27. if [msg] =~ "^ *{" {
  28. json {
  29. source => "msg"
  30. }
  31. if "_jsonparsefailure" in [tags] {
  32. drop {}
  33. }
  34. mutate {
  35. remove_field => [ "msg" ]
  36. }
  37. }
  38. }
  39.  
  40.  
  41.  
  42. output {
  43. elasticsearch {
  44. hosts => "elasticsearch:9200"
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement