SHARE
TWEET

Untitled

a guest Apr 26th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. input {
  2.     beats {
  3.         port => 5400
  4.         ssl => true
  5.         ssl_certificate_authorities => ["/etc/elk-certs/elk-ssl.crt"]
  6.         ssl_certificate => "/etc/elk-certs/elk-ssl.crt"
  7.         ssl_key => "/etc/elk-certs/elk-ssl.key"
  8.         ssl_verify_mode => "force_peer"
  9.     }
  10. }
  11.  
  12. filter {
  13.  grok {
  14.    match => [ "message" , "%{COMBINEDAPACHELOG}+%{GREEDYDATA:extra_fields}"]
  15.    overwrite => [ "message" ]
  16.  }
  17.  mutate {
  18.    convert => ["response", "integer"]
  19.    convert => ["bytes", "integer"]
  20.    convert => ["responsetime", "float"]
  21.  }
  22.  geoip {
  23.    source => "clientip"
  24.    target => "geoip"
  25.    add_tag => [ "nginx-geoip" ]
  26.  }
  27.  date {
  28.    match => [ "timestamp" , "dd/MMM/YYYY:HH:mm:ss Z" ]
  29.    remove_field => [ "timestamp" ]
  30.  }
  31.  useragent {
  32.    source => "agent"
  33.  }
  34. }
  35.  
  36. output {
  37.  elasticsearch {
  38.    hosts => ["localhost:9200"]
  39.    index => "weblogs-%{+YYYY.MM.dd}"
  40.    document_type => "nginx_logs"
  41.  }
  42.  stdout { codec => rubydebug }
  43. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top