I have Elasticsearch and Kibana running in docker containers on my computer.
Is it possible to redirect console output from my C# .NET application to the Elasticsearch? I am using Serilog and I know how to configure appsettings to forward logs directly to the Elasticsearch. But it is not what I need. I am wondering if it is possible to forward console output to the Elasticsearch without changing application ot its config?
I found this article Writing logs to Elasticsearch with Fluentd using Serilog in ASP.NET Core saying that Fluentd might do what I want. I just don't understand how to properly configure td-agent.conf.
<source>
@type forward
port 24224
bind 0.0.0.0
</source>
<match es.**.*>
@type forest
subtype elasticsearch
<template>
host localhost
port 9200
logstash_format true
logstash_prefix ${tag}
include_tag_key true
tag_key @log_name
flush_interval 1s
</template>
</match>
Or am I on the wrong path here anyway?