im trying to use hints-based autodiscovery in our Openshift/Kubernetes environment to dissect the logs of our Springboot-based microservices (Filbeat 7.7.0). So far, dissecting the message and parsing the timestamp are working (NO thanks to the abysmal documenation of the Filebeat dissect processor, I might add).
What I now want to do is to replace the 'message' field with the extracted message I got using the dissect processor. In order to do so, I need to use the copy_fields or rename_fields processor, e.g., like this:
Which failed because Filebeat complained that it expected an object and not a string.
How am I supposed to configure the copy_fields- and rename-processors using annotations?
If it's not possible, is this a bug that can be fixed?
If it's not, shouldn't the documentation clearly warn people to not trying to use those in hints-based autodiscovery so they are spared of wasting hours on trying to get this to work?
Maybe someone has had more luck than me using this...
is NOT Filebeat complaing that it expected an error but got a string. Instead, Filebeat seems to process the configuration, but then logs an error in the field 'error.message':
Failed to rename fields in processor: could not fetch value for key: , Error: key not found
Seems as though the configured name of the key (here: 'message') is ignored (I tried it also with some other fields to the same result).
As for the array attempt, I tried various permutations, all with the same result: Filebeat throws an error and no log message gets pushed to Elasticsearch. I tried:
2020-05-22T03:45:57.813Z ERROR [autodiscover] cfgfile/list.go:96 Error creating runner from config: failed to unpack the rename configuration: required 'object', but found 'string' in field 'processors.1.rename.fields'
Something I only just saw: the error message logged by Filebeat states 'processors.1.rename.fields' even though I have defined that processor 'co.elastic.logs/processors.2.rename.fields'
We certainly could do that, but:
We have a very heterogenous landscape with different technologies and log layouts. Using the hints-based autodiscover, each team can customize the logscraping to their needs relatively easily without us having to manage various ingest pipelines.
The ability to use the rename- or copy_fields-processor in the hints-based autodiscover configuration on Kubernetes/Openshift is a nice-to-have to us. If these cannot be used, then this is not a problem to us.
However, the documentation of hints-based autodiscover should be adapted to state that those cannot be used.
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.