21 questions
2
votes
1
answer
2k
views
How to log using serilog to elasticsearch with Elastic.Serilog.Sinks in .net application
I want to log to elasticsearch using serilog.
I have added Elastic.Serilog.Sinks package to my application.
But there is no way to pass username and password while configuring serilog elasticsearch ...
0
votes
1
answer
362
views
Unable to write logs to Elasticsearch from .Net 8 WebAPI using serilog when security is enabled
I am unable to send logs to elasticsearch 8.12.2 when security is enabled on elasticsearch server. However, when I disable the security I can see the logs on elasticsearch server.
Below are the ...
0
votes
1
answer
342
views
Unable to connect elasticsearch from .NET Web API
I'm trying to set up logging for my .NET Web API application using Serilog, and send logs to Elasticsearch and view them from Kibana. But I am receiving errors while trying to connect elasticsearch ...
0
votes
1
answer
324
views
Serilog Elasticsearch proxy in ASP.NET Core
I currently have a .NET console applications where I sink my logging to ELK using the partial complete method below:
private static LoggerConfiguration AddElasticSearch(this LoggerConfiguration config,...
2
votes
2
answers
376
views
No Serilog logs are made from my asp.net core webapi to my dockerized elasticsearch
No Serilog logs are made from my ASP.NET Core Web API to my dockerized elasticsearch. Why is that?
I have an ASP.NET Core Web API where I've installed
<PackageReference Include="Serilog....
0
votes
1
answer
861
views
Serilog ElasticSearch Sink custom properties
I'm trying to log to my Elasticsearch instance some data from .NET 6.0 Web Api with Serilog.AspNetCore and Serilog.Sinks.Elasticsearch installed, but I need to use custom properties for example:
...
2
votes
0
answers
187
views
Formating ElapsedTime (Timespan) when logging in ElasticSearch with Serilog (C#)
I'm trying to log the elapsed time of a StopWatch with Serilog with an ElasticSearch sink.
I managed to print my log properly in console and file with the following command:
Log.Information("...
0
votes
1
answer
92
views
Resend failed messages with Serilog.Sinks.Elasticsearch
I'm using the Serilog.Sinks.Elasticsearch nuget package and Elasticsearch was missing shards for a while. As a result I've got a lot of failed messages saved as invalid-**.json files.
How do I resend ...
2
votes
1
answer
247
views
Serilog Logz.io not logging
I've been asked to add to my current Serilog sinks also Logz.io(I never used it), I normally use Seq from DataLust.
Here's my configuration part
{
"Name": "LogzIo",
...
0
votes
1
answer
909
views
How to configure Elasticsearch sink with appsettings.json?
I am configuring Serilog for my application. The intent is to configure Serilog completely through appsettings.json. My problem is, everywhere on the web, Elasticsearch's configuration is explained ...
1
vote
1
answer
621
views
How do I add the failureSink to elasticsearchSink
I add FileSink as failureSink to ElasticsearchSink from appSettings.json. But "Cannot create instance of type 'Serilog.Core.ILogEventSink' because it is either abstract or an interface." I ...
0
votes
1
answer
614
views
Get Log Stream from Serilog in Elasticstack
I'm currently evaluating the Serilog.Sinks.Elasticsearch sink for Serilog in a .NET Core web service.
I successfully managed to pump some log messages through that sink using the following config (...
1
vote
0
answers
141
views
serilog on ElasticsearchSinkOptions mapper_parsing_exception
when try to use elastic search with serilog show me this error on log some data
Failed to store event with template 'HttpClient Request: {RequestName} {@Request}' into Elasticsearch. Elasticsearch ...
2
votes
0
answers
589
views
ElasticSearch : Failure Sink always running
The logs are always being written to both Elastic Search and Local Log Files (when used as a Failure Sink) . This should not be the case. Local Log Files should be created only when the application ...
5
votes
0
answers
570
views
Customize Serilog configuration after ReadFrom.Configuration
I have a ASP.NET Core 5 Web API application in which I am using Serilog like this:
public static class Program
{
public static void Main(string[] args)
{
Log.Logger = new ...
8
votes
1
answer
6k
views
Serilog Elasticsearch 8 sink - Exception: Action/metadata line [1] contains an unknown parameter [_type]
Caught exception while performing bulk operation to ElasticSearch:
Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 400 from: POST /_bulk. ServerError: ...
0
votes
1
answer
1k
views
Override fields.RequestId in ElasticSearch logs from ASP.NET Core app
I have a simple ASP.NET Core console app with Serilog logging which writes logs to ElasticSearch:
private static void ConfigureLogging(bool isTestEnvironment)
{
var configuration = new ...
2
votes
1
answer
1k
views
"Message" field is not send by Serilog ElasticSearch sink
I configured application to send logs to elastic search. I use https://www.elastic.co/cloud/
Everything seems to work fine except one thing: logs appear to not have "message" field (...
2
votes
0
answers
288
views
How to force serilog to write log level as int in ElasticSearch
Currently, I'm using Serilog in my ASP.NET 5 project to log all my logs, and 2 Sinks: SQL Server and ElasticSearch.
Each log has a field "Level" by default, and in SQL Server it is written ...
0
votes
1
answer
1k
views
Elastic-Cloud Not Receiving Data from Serilog Sink
I set up an Elastic Cloud to offload my local elasticsearch config (as one does), but for reasons unknown to me, I can't get it to show any logs in Elastic Cloud, despite it working fine locally.
The ...
1
vote
1
answer
1k
views
How to change Serilog field name posted to Elastic Search
I have gotten my serilog elastic search sink working. My problem now is I am looking for a way to override or remove the default out of the box fields naming convention when logs are posted to elastic ...