I'm using ElasticAgent to output data into Kafka. When using version 8.13.3 there is an error:
status: (FAILED) could not start output: failed to reload output: topic '%{[fields.kafka_topic]}' is invalid, it must match '[a-zA-Z0-9._-]' accessing 'kafka'
In Elastic-Agent.yml output is configured like this
Thanks. I should have read that by myself. For my point of view this change is bad, because I want to output different data to different Kafka topic (metrics, system logs, different file stream logs etc.) Is there some other way to do this?
Probably only if you change your output to use the logstash output, then you could have some logic in logstash to send the data to different topics based on the content of the message.
I think I figured out how to do this. I'll create multiple Kafka outputs, where everything else similar except name and topic. Then in input section refer to different output-name
I mentioned Logstash because when using filebeat/elastic agent you cannot have multiple outputs for the same input, so the solution is to use a logstash output and have it direct the logs according to some logic.
I do not use the Elastic Agent on stand alone mode, but it seems that in your case you will have multiple inputs and each input will have one different output, I'm not sure this works, you will need to test it.
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.