怎样才能把收上来日志字段转换string为number? 我已经再logstash里配置转换为integer了,但是到kibana里显示还是string, 还没法转换。如下图:
logstash conf:
convert => { "upload" => "integer" }
convert => { "download" => "integer" }
logstash 输出:
{
"message" => "Apr 18 11:14:12 localhost sftp-server[4022]: close \"/etc/logstash/conf.d/logstash_out.conf\" bytes read 0 written 1745",
"tags" => [
[0] "l_sftp"
],
"source" => "/var/log/sftp.log",
"@timestamp" => 2018-04-18T03:14:14.876Z,
"filename" => "/etc/logstash/conf.d/logstash_out.conf",
"hostname" => "elk",
"download" => "0",
"upload" => "1745"
}
logstash conf:
convert => { "upload" => "integer" }
convert => { "download" => "integer" }
logstash 输出:
{
"message" => "Apr 18 11:14:12 localhost sftp-server[4022]: close \"/etc/logstash/conf.d/logstash_out.conf\" bytes read 0 written 1745",
"tags" => [
[0] "l_sftp"
],
"source" => "/var/log/sftp.log",
"@timestamp" => 2018-04-18T03:14:14.876Z,
"filename" => "/etc/logstash/conf.d/logstash_out.conf",
"hostname" => "elk",
"download" => "0",
"upload" => "1745"
}
2 个回复
yayg2008
赞同来自:
xinfanwang
赞同来自: