0
字符串我這個配置文件中logstash只有在influxdb
input {
\t \t
\t redis{
\t \t host => "localhost"
\t \t data_type => "list"
\t \t key => "vortex"
\t \t threads => 4
\t \t type => "testrecord"
\t \t codec => "plain"
\t }
\t }
filter {
kv {
add_field => {
"test1" => "yellow"
"test" => "ife"
"feild" => "pink"
}
}
}
output {
\t stdout { codec => rubydebug }
influxdb {
\t \t db => "toast"
host => "localhost"
measurement => "myseries"
allow_time_override => true
use_event_fields_for_data_points => true
exclude_fields => ["@version", "@timestamp", "sequence", "message", "type", "host"]
\t \t \t send_as_tags => ["bar", "feild", "test1", "test"]
\t \t }
}
\t \t \t
\t \t \t
\t \t
和Redis的數據如下列表:
富= 10207條= 1傳感器2 = 1 sensor3 = 33.3 time = 1489686662
一切正常,但涌入的每個字段都被定義爲字符串,而不管值如何。
有沒有人知道如何解決這個問題?
非常感謝,這解決了我的問題。我首先使用filer {kv {} ...}進行解析,之後,mutator ...很好用!非常感謝! –