Advertisement
Guest User

Untitled

a guest
Feb 19th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. input {
  2. file {
  3. path => "/var/log/nginx/opa.magritte.arte.tv_access.log"
  4. start_position => "beginning"
  5. type => "nginx_access"
  6. add_field => { "application" => "opa" }
  7. }
  8. }
  9.  
  10.  
  11. filter {
  12. if [type] =="nginx_access" {
  13. grok {
  14. match => { "message" => "%{COMBINEDAPACHELOG}"}
  15. }
  16. date {
  17. match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
  18. }
  19. }
  20. }
  21.  
  22. output {
  23. stdout { codec => rubydebug }
  24. file {
  25. path => "/tmp/logstash_test.log"
  26. }
  27. rabbitmq {
  28. host=>"***"
  29. user=>"***"
  30. exchange=>"logstash"
  31. exchange_type=>"topic"
  32. password=>"***"
  33. vhost=>"logstash"
  34. key=>"magritte"
  35. port=>5672
  36. codec => plain {
  37. charset =>"Windows-1252"
  38. format =>"utf-8"
  39. }
  40. }
  41. }
  42.  
  43. {"message":"api.magritte.arte.tv 127.0.0.1 - - [19/Feb/2016:00:15:09 +0100] "GET /api/player/documentation/generated HTTP/1.1" 200 10554 "-" "Guzzle/5.3.0 curl/7.19.7 PHP/5.6.11" "-" 0.033 0.033 .","@version":"1","@timestamp":"2016-02-18T23:15:09.000Z","path":"/var/log/nginx/api.magritte.arte.tv_access.log","host":"magritte.arte.tv","type":"nginx_access","application":"api","clientip":"127.0.0.1","ident":"-","auth":"-","timestamp":"19/Feb/2016:00:15:09 +0100","verb":"GET","request":"/api/player/documentation/generated","httpversion":"1.1","response":"200","bytes":"10554","referrer":""-"","agent":""Guzzle/5.3.0 curl/7.19.7 PHP/5.6.11""}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement