I'm working on reconfiguring log messages that come in as JSON strings so that I can POST them to an HTTP service with headers. Using beats input for Logstash. The main hurdle here is that I'd like to convert the "headers" part of the incoming JSON into a Hash that would be appropriate to send down to the http output plugin.
This extracts all headers as JSON and puts them in a Hashmap "headers_hash".
The issue that remains to be solved is that I can't correctly pass "headers_hash" into the headers field for the http output plugin with the following configuration:
22:20:05.766 [LogStash::Runner] ERROR logstash.outputs.http - Invalid setting for http output plugin:
output {
http {
# This setting must be a hash
# This field must contain an even number of items, got 1
headers => "headers_hash"
...
}
}
which is puzzling because "headers_hash" is a Hashmap.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.