Given the following config, I expect db_size
to have the same value as body.info.sizes.active
.
But it appears the copy can not resolve the nested field body.info.sizes.active
.
input {
http_poller {
urls => {
getAllDbs => {
url => "http://couchdb:5984/_all_dbs"
method => get
user => "admin"
password => "admin"
}
}
request_timeout => 60
schedule => { cron => "* * * * * UTC}"}
codec => "plain"
}
}
filter {
json {
source => "message"
target => "all_dbs"
}
split {
field => "all_dbs"
target => "db_name"
}
http {
url => "http://couchdb:5984/%{db_name}"
verb => "GET"
user => "admin"
password => "admin"
target_body => "body.info"
}
mutate {
copy => {"body.info.sizes.active" => "db_size"}
}
}
However, body.info
is correctly recognised as hash (I tried to parse it through a json filter, and it failed with message :exception=>java.lang.ClassCastException: org.jruby.RubyHash cannot be cast to org.jruby.RubyIO`)
Am I doing something wrong, is this normal behaviour?