Advertisement
Guest User

Untitled

a guest
Dec 19th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Where to get input
  2. input {
  3. # NAGIOS input
  4. beats {
  5. port => 5044
  6. ssl => false
  7. tags => ["nagios"]
  8. type => "nagios"
  9. }
  10. }
  11.  
  12. # Some Filtering
  13. filter {
  14. #Nagios filter
  15. if [type] == "nagios" {
  16. grok {
  17. match => { "message" => "%{NAGIOSLOGLINE}" }
  18. }
  19. }
  20. }
  21.  
  22. # Where to send output
  23. output {
  24. # Send output to standard output device/interface
  25. stdout {
  26. codec => rubydebug
  27. }
  28.  
  29. # Parse failed messages to separate index
  30. if "_grokparsefailure" in [tags] {
  31. elasticsearch {
  32. # host => ["localhost:9200"]
  33. host => ["ES_CONN_STR"]
  34. index => "cgidev-parse-err-%{+YYYY.MM.dd}"
  35. protocol => "http"
  36. user => logstash
  37. password => logstash
  38. }
  39. }
  40.  
  41. # Elasticsearch output
  42. elasticsearch {
  43. # host => ["localhost:9200"]
  44. host => ["ES_CONN_STR"]
  45. index => "cgidev-logstash-%{+YYYY.MM.dd}"
  46. protocol => "http"
  47. user => logstash
  48. password => logstash
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement