i have the following in my config file, where i'm using the GeoIPASNum database to add the AS of an IP to its own field (asn_id.orig_h.number)
if [id.orig_h] {
geoip {
database => "/opt/logstash/vendor/geoip/GeoIPASNum.dat"
source => "id.orig_h"
target => "asn_id.orig_h"
}
mutate {
add_tag => [ "%{asn_id.orig_h.number}" ]
}
the lookup is successful because I can see the fields in kibana/es, however its not adding the AS (eg: AS12345) and instead its adding %{asn_id.orig_h.number} as a string. i've also tried moving the mutate to a new section with something like:
if [asn_id.orig_h.number] {
mutate {
add_tag => [ "%{asn_id.orig_h.number}" ]
}
but that also fails. any ideas on how I can get this working?