logstash 收集 IIS 日志实践
2017-06-01 18:28
225 查看
IIS日志示例:
collect_iis.conf
2017-02-20 00:55:40 127.0.0.1 GET /MkWebAPI/swagger/ui/index - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/49.0.2623.75+Safari/537.36 200 0 0 32
collect_iis.conf
input { file { type => "iis_log_1" path => ["C:/inetpub/logs/LogFiles/W3SVC1/*.log"] start_position => "beginning" } } filter { if [type] == "iis_log_1" { #ignore log comments if [message] =~ "^#" { drop {} } grok { # check that fields match your IIS log settings match => ["message", "%{TIMESTAMP_ISO8601:log_timestamp} %{IPORHOST:site} %{WORD:method} %{URIPATH:page} %{NOTSPACE:querystring} %{NUMBER:port} %{NOTSPACE:username} %{IPORHOST:clienthost} %{NOTSPACE:useragent} %{NUMBER:response} %{NUMBER:subresponse} %{NUMBER:scstatus} %{NUMBER:time_taken}"] } date { match => [ "log_timestamp", "YYYY-MM-dd HH:mm:ss" ] timezone => "Etc/UTC" } useragent { source=> "useragent" prefix=> "browser" } mutate { remove_field => [ "log_timestamp"] } } } output { if [type] == "iis_log_1" { logservice { codec => "json" endpoint => "***" project => "***" logstore => "***" topic => "" source => "" access_key_id => "***" access_key_secret => "***" max_send_retry => 10 } } }
相关文章推荐
- Logstash日志收集实践
- LogStash实践日志分析二:收集数据、入库、数据分析和kibana展示
- LogStash实践日志分析二:收集数据、入库、数据分析和kibana展示
- LogStash实践日志分析二:收集数据、入库、数据分析和kibana展示
- Logstash收集nginx日志之使用grok过滤插件解析日志
- 用Kibana和logstash快速搭建实时日志查询、收集与分析系统
- logstash与filebeat收集日志
- logstash与filebeat收集日志
- 分布式日志收集之Logstash 笔记(二)
- Logstash/Filebeat->Logstash->Kafka->Spring-kafka->MongoDb->Spark日志收集和处理
- filebeat+logstash+elasticsearch收集haproxy日志
- 用Kibana和logstash快速搭建实时日志查询、收集与分析系统
- 使用ELK(Elasticsearch + Logstash + Kibana) 搭建日志集中分析平台实践--转载
- 用Kibana和logstash快速搭建实时日志查询、收集与分析系统
- 用Kibana和logstash快速搭建实时日志查询、收集与分析系统
- 使用kibana+logstash+elasticsearch+redis搭建分布式日志收集、分析、查询系统。
- logstash与filebeat收集日志
- logstash与filebeat收集日志
- logstash收集nginx访问日志
- windows下Elasticsearch+Logstash+Kibana日志收集分析系统安装教程