基本信息
版本:5.2
默认端口:9200
语法
输入
input {
}
输出
output {
}
过滤器
filter {
}
grok配置
nginx的默认log_format格式
$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'
实用配置
普通文件输入
input {
file {
# 多个文件可用","分开,如["文件1","文件2"]
path => ["/data/web/logstash/logFile/*/*"]
start_position => "beginning" #从文件开始处读写
}
#stdin {} #可以从标准输入读数据
}