1
フィールド値に基づいてlogstashで動的に辞書を翻訳する方法は? は、例えば、私の現在の構成は次のとおりです。フィールド値に基づいてlogstashで動的に辞書を動かすには?
if [host] == "1.1.1.1" {
translate {
field => "[netflow][input_snmp]"
destination => "[netflow][interface_in]"
dictionary_path => "/etc/logstash/yaml/1.1.1.1.yml"
}
}
if [host] == "2.2.2.2" {
translate {
field => "[netflow][input_snmp]"
destination => "[netflow][interface_in]"
dictionary_path => "/etc/logstash/yaml/2.2.2.2.yml"
}
}
は、これを達成するための一般的な方法はありますか? Logstashバージョン私はあなたのようにそれを使用することができますね2.2.4
おかげ
:という
チェック #この設定はパスでなければなりません #ファイルが存在しないか、開くことができません/etc/logstash/yaml/%{host}.yml dictionary_path => "" /etc/logstash/yaml/%{host}.yml " – eladelad
ここでもフィールドプレースホルダはdictionary_pathで動作していないようです。 @alpert他のアイデア? – sermolaev
"/etc/logstash/yaml/%{[host]}.yml" @sermolaevを使ってみましたか? – alpert