Advertisement
Guest User

Untitled

a guest
Dec 11th, 2015
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. input {
  2. file {
  3. path => "/home/htpcguides/syslog/*.log"
  4. start_position => "beginning"
  5. type => "syslog"
  6. }
  7. }
  8.  
  9.  
  10. filter {
  11. if [type] =~ "syslog" {
  12. grok {
  13. pattern => ['(?:%{SYSLOGTIMESTAMP:timestamp}|%{TIMESTAMP_ISO8601:timestamp8601}) (?:%{SYSLOGHOST:logsource}) (?:%{SYSLOGPROG}): (?<messagebody>(?:\[(?<esxi_thread_id>[0-9A-Z]{8,8}) %{DATA:esxi_loglevel} \'%{DATA:esxi_service}\'\] %{GREEDYDATA:esxi_message}|%{GREEDYDATA}))']
  14. type => "esxi"
  15. }
  16. }
  17. }
  18.  
  19. output {
  20. elasticsearch { hosts => ["localhost:9200"] }
  21. stdout { codec => rubydebug }
  22. }
  23.  
  24. You are using a deprecated config setting "pattern" set in grok. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. You should use this instead: match => { "message" => "your pattern here" } If you have any questions about this, please visit the #logstash channel on freenode irc. {:name=>"pattern", :plugin=><LogStash::Filters::Grok pattern=>["(?:%{SYSLOGTIMESTAMP:timestamp}|%{TIMESTAMP_ISO8601:timestamp8601}) (?:%{SYSLOGHOST:logsource}) (?:%{SYSLOGPROG}): (?<messagebody>(?:\\[(?<esxi_thread_id>[0-9A-Z]{8,8}) %{DATA:esxi_loglevel} \\'%{DATA:esxi_service}\\'\\] %{GREEDYDATA:esxi_message}|%{GREEDYDATA}))"], type=>"esxi">, :level=>:warn}
  25. Error: The setting `type` in plugin `grok` is obsolete and is no longer available. You can achieve this same behavior with the new conditionals, like: `if [type] == "sometype" { grok { ... } }`. If you have any questions about this, you are invited to visit https://discuss.elastic.co/c/logstash and ask.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement