Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. input {
  2. lumberjack {
  3. port => my_port
  4. ssl_certificate => "my.crt"
  5. ssl_key => "my.key"
  6. }
  7. file {
  8. path => "/var/log/ciscoswitch.log"
  9. type => "switch_cisco"
  10. }
  11. }
  12.  
  13. filter {
  14. if [type] == "jboss_application_log" {
  15. grok {
  16. match => [ "file", "/usr/local/jboss/server/%{NOTSPACE:instance}/log/apps/%{NOTSPACE:application}/aplicacion_error.log"]
  17. tag_on_failure => "jboss_application_log_parsefailure"
  18. }
  19. mutate { replace => { "host" => "a_host" } }
  20. }
  21.  
  22. if [type] == "jboss_server_log" {
  23. multiline {
  24. pattern => "^\d"
  25. negate => true
  26. what => "previous"
  27. }
  28. grok {
  29. match => [ "message", "%{JBOSSMESSAGE:jboss_message}" ]
  30. remove_field => "jboss_message"
  31. tag_on_failure => "jboss_server_log_parsefailure"
  32. }
  33. date {
  34. match => [ "timestamp", "yyyy-MM-dd HH:mm:ss,SSS" ]
  35. locale => "en"
  36. timezone => "a_time_zone"
  37. remove_field => "timestamp"
  38. }
  39. }
  40. if [type] == "jboss_tomcat_log" {
  41. grok {
  42. match => [ "message", "%{TOMCATMESSAGE:tomcat_message}" ]
  43. remove_field => "tomcat_message"
  44. tag_on_failure => "jboss_tomcat_log_parsefailure"
  45. }
  46. useragent {
  47. source => "agent"
  48. }
  49. geoip {
  50. source => "geoip.location"
  51. }
  52. }
  53. if [type] == "switch_cisco" {
  54. grok {
  55. match => [ "message", "%{SWITCHESCISCO:cisco_message}" ]
  56. remove_field => "cisco_message"
  57. tag_on_failure => "switch_cisco_parsefailure"
  58. }
  59. }
  60. }
  61.  
  62. output {
  63. elasticsearch_http {
  64. host => "an_ip"
  65. index => "logstash-%{[type]}-%{+YYYY.MM.dd}"
  66. }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement