I am currently migrating our existing Filebeat-based log collection architecture to the Elastic Agent as OpenTelemetry Collector approach and would appreciate some clarification.
I am following the "Elastic Agent as OTel Collector" documentation and have been trying to replace our existing Filebeat pipelines with a configuration based on the filebeatreceiver.
@stephenb
No errors from Logstash or Elasticsearch exporter.
in debug exporter everything seems find .. events are successfully modified.. logs files are processed
it is deployed in k8s.
Collectors:daemon:config:service:pipelines
it's still not clear to me what your full ingestion path is. You mentioned logstash I don't see a config.
I'm not sure I can help unless I know with the full ingestion architecture is.
And the full configs Little snippets are hard to reconstruct...
If you skip logstash and go straight from the collector to elasticsearch the do the events show up??
Do the events show up in logstash when you turn on the debug?
I'd like to help but you're going to need to be much more specific or perhaps someone else has an idea.
I do know putting logstash in the middle of an OTEL flow is prone to not working correct. Logstash is not really part of the native otel flow.
I don't know what indices you're trying to write to, if you've touched the data it could be rejected due to mapping conflicts, etc. too hard to tell without all the explicit detail.
@stephenb my setup is quite straightforward...
as I said earlier if I use debug exporter(instead of elasticsearch or logstash) everything seems fine . Logstash is not requited I just wanted to test if I can send the data to logstash instead of elasticsearch . Again just replaced one exported with another ... nothing fancy,
The collector picked up the *.log files .
Processed them correctly.
Not sure why the exporters like elasticsearch and logstash does seems to work correctly.
In general is the setup shown in the screenshot (attached in my previous message) supported or not? That is the most important question.
Our main target is to migrate from Filebeat pipelines to Elastic agent as Otel collector.
Elastic agent as otel collector
(I want to reuse filebeat configuration that is why we have filebeatreceiver section as in the screenshot). The documentations claims that it is supported. Also logs provided by debug exporter confirms it.
The data is sent to different output based on the exporter set (debug , elasticsearch or logstash) .
don't pay attention to the indentation here. it is correct . just copy / paste caused some issues.
of course we have defines :
service: pipelines: logs: receivers
Hi @Ts_P Sorry yeah I think I was confused about what you are asking
What seems simple / direct to one... is not always to another.....
So first and foremost I just ran this and it works as specified.
I am getting ECS logs in elasticsearch, basically the same as if used filebeat.
So yes the Right Hand Side of that image does work / supported.
Now if you are asking if every filebeat possible configuration works in the OTEL version I do not know that.
This is NOT straight forward and does require "fancy" ... there is no direct exporter to logstash AFAIK... you would have to do extra configuration etc...
It would be something along the lines of the following from an internal discussion ... not straightforward.
Or you can egress using the elasticsearch exporter like this:
elasticsearch/logstash:
endpoints: # list of logstash endpoints (or load balancer)
- http://logstash:8080
flush:
interval: 1s
tls:
insecure_skip_verify: true
# organize output fields similar to filebeat
mapping:
mode: otel
# required for es_bulk codec in logstash
headers:
Content-Type: application/x-ndjson
and then use the logstash http input w/ es_bulk encoding.
Hope this helps... in Short logstash is not currently part of a normal OTEL flow.
You are not the only enquiring / thinking about using logstash because of its processing capabilities.
thanks a lot for the hints .
I have managed to establish communication between Elastic agent and elasticsearch.
There was an issue with my env params. It was my fault. thanks for sharing your configuration.
Also I decided to pass my logs to exporter -> otpl_grpc/gateway and then the gateway send them to elasticsearch.
About logstash I wanna try this... it says it is compatible with filebeatreceiver
Pretty substantial caveat... It's not a generic logstash exporter
This component is only expected to work correctly with data from the Beat receivers: Filebeat receiver, Metricbeat receiver. Using it with data coming from other components is not recommended and may result in unex
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.