Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Support for log forwarding through Elastic Agent using Custom HTTP Logs integration #409

Open
mattmichal opened this issue Jun 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mattmichal
Copy link

Is it possible to use the Elastic.Serilog.Sinks package to send logs to an Elastic Agent having the Custom HTTP Logs integration?

From serilog-contrib/serilog-sinks-elasticsearch#486:

Elastic.Serilog.Sinks will not only target Elasticsearch.
Long term we will explore it sending data to our APM product, OTLP, Logstash, Elastic Agent and many others.

In my testing with an agent having the custom logs integration listening on port 8080, I'm getting an error.

config.WriteTo.Elasticsearch(new[] { new Uri("http://localhost:8080") }, opts =>
{
    opts.DataStream = new DataStreamName("logs", "dotnet", "default");
    opts.BootstrapMethod = BootstrapMethod.Failure;
});

Error:

System.Exception: Failure to create component template `ecs_8.11.0_agent` for logs-dotnet-*: Invalid Elasticsearch response built from a unsuccessful (405) low level call on PUT: /_component_template/ecs_8.11.0_agent
Exception: Failed to ping the specified node. Call: Status code 405 from: HEAD /

If this is not supported, is it planned?

Is there an alternate way to use Serilog to send logs via an agent? We have certain authorization considerations that will not allow us to push logs directly to our Elastic Cloud instance.

@mattmichal mattmichal added the enhancement New feature or request label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant