/********* 把字符串转换成整型
zjtest7-frontend:/usr/local/logstash-2.3.4/config# cat geoip.conf
input {stdin {} }
filter {
geoip {
source =>"message"
add_field => [ "[geoip][scantest]", "%{[geoip][location][0]}" ]
}
mutate {
convert => [ "[geoip][region_name]", "integer"]
}
}
output {
stdout {
codec => rubydebug{}
}
}
zjtest7-frontend:/usr/local/logstash-2.3.4/config# ../bin/logstash -f geoip.conf
Settings: Default pipeline workers: 1
Pipeline main started
115.218.62.240
{
"message" => "115.218.62.240",
"@version" => "1",
"@timestamp" => "2016-09-11T04:25:13.291Z",
"host" => "0.0.0.0",
"geoip" => {
"ip" => "1
把字符串转换为整型
最新推荐文章于 2022-09-10 08:54:38 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)