I've gotten Serilog writing to a rolling file okay and started implementing a connection to a Docker-based ElasticSearch instance. However, I am having connection issues.
To start, my application is running locally and there's two big take-aways:
- I can reach the Elastic service from my machine

- Kibana is showing that my service created an index with the name I specified

However, when I look at the output of Serilog.Debugging.SelfLog.Enable(msg => Debug.WriteLine(msg));, I see there's some sort of connection issue with Elastic:
Caught exception while preforming bulk operation to Elasticsearch: Elasticsearch.Net.ElasticsearchClientException: Maximum timeout reached while retrying request
My appsettings.json (yes, I am configuring through json and not code):
"Serilog": {
"Using": ["Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Sinks.ElasticSearch"],
"MinimumLevel": {
"Default": "Debug",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
}
},
"Enrich": ["FromLogContext", "WithExceptionDetails"],
"WriteTo": [
{ "Name": "Console" },
{ "Name": "Debug" },
{
"Name": "File",
"Args": {
"path": "%LogDir%\\someserverpath.xyz.com\\log-.txt",
"rollingInterval": "Day",
"shared": true
}
},
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://sxdockertst1:9200",
"indexFormat": "imaging4cast-index-{0:yyyy.MM}",
"emitEventFailure": "WriteToSelfLog",
"autoRegisterTemplate": true
}
}
],
"Properties": {
"Application": "xyz.yyy.Imaging4CastApi"
}
},
I feel like it's getting rudimentary connection because, otherwise, how else would the index have been created? There's no auth on the elastic server, either. But actually pushing a log message doesn't appear to be working...
I'm at a loss here...

nodeUrisbut still gets a timeout, FYI.