1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| //检测conf是否通过 bin/logstash -f test.conf --configtest configation OK //启动 bin/logstash -f test.conf /stdout记录输出,并输出到elasticsearch { "message" => "127.0.0.1 | - | 11/Nov/2015:13:14:53 +0800 | GET /file/test.img?width=800&height=600 HTTP/1.1 | 404 | 570 | - | Mozilla/5.0 (Wind ows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Sa fari/537.36 | - \r", "@version" => "1", "@timestamp" => "2015-11-11T05:14:53.000Z", "host" => "Jevirs-PC", "path" => "D:\\nginx\\nginx\\logs\\access_test.log", "remote_addr" => "127.0.0.1", "remote_user" => "-", "time_local" => "11/Nov/2015:13:14:53 +0800", "status" => "404", "body_bytes_sent" => 570, "http_referer" => "-", "http_user_agent" => "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/5 37.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36", "http_x_forwarded_for" => "- \r", "method" => "GET", "verb" => "HTTP/1.1", "url_path" => "GET /file/test.img", "url_width" => "800", "url_height" => "600" }
|