Is it possible to send collector logs to Splunk? #4461
-
I'm not referring to sending application logs to Splunk using Splunk HEC exporter. When you have logging exporter configured on your collector, your terminal shows collector logs such as
when the collector is ready or
when the collector fails to export data. I want to send these collector logs to Splunk. Is there a way to configure something in the collector to capture these collector logs and send it to Splunk? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
/cc @atoulme |
Beta Was this translation helpful? Give feedback.
-
Since logs of the otelcollector go to stdout by default, you could potentially collect them and send them to be ingested by a service, HEC or otherwise. Did you want to set up a pipeline specifically for that, in the same way collector metrics can be sent? |
Beta Was this translation helpful? Give feedback.
-
I was able to accomplish my use case by using the following command. |
Beta Was this translation helpful? Give feedback.
I was able to accomplish my use case by using the following command.
./otelcontribcol_linux_amd64 --config config.yaml >> ./collectorlog.txt 2>&1 &
This creates a text file with the collector logs and I use filelogreceiver to grab the logs from the file