Using Field Data in Output Hosts?

Hello, I am trying to use the value of a field when I am defining hosts in logstash output. I've been able to do this in other logstash outputs like index. Is this possible?
For example:

output {
elasticsearch {
hosts => ["%{host1}", "%{host2}"]
}
}

I get an error about a malformed escape pair when I try this. I am doing something very similar in other fields without issue.

No. An elasticsearch output establishes a connection to the elasticsearch instance during initialization. It cannot reconnect to a different instance for each event based on a field on that event.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.