Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input {
- file {
- path => "/var/log/nginx/opa.magritte.arte.tv_access.log"
- start_position => "beginning"
- type => "nginx_access"
- add_field => { "application" => "opa" }
- }
- }
- filter {
- if [type] =="nginx_access" {
- grok {
- match => { "message" => "%{COMBINEDAPACHELOG}"}
- }
- date {
- match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
- }
- }
- }
- output {
- stdout { codec => rubydebug }
- file {
- path => "/tmp/logstash_test.log"
- }
- rabbitmq {
- host=>"***"
- user=>"***"
- exchange=>"logstash"
- exchange_type=>"topic"
- password=>"***"
- vhost=>"logstash"
- key=>"magritte"
- port=>5672
- codec => plain {
- charset =>"Windows-1252"
- format =>"utf-8"
- }
- }
- }
- {"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