bruno-garcia / log4net.ElasticSearch

log4net appender to ElasticSearch
https://bruno-garcia.github.io/log4net.ElasticSearch/
Other
219 stars 92 forks source link

Elastic Cloud connection issue #99

Closed aadiwarden closed 5 years ago

aadiwarden commented 6 years ago

Hi there, so I am trying to connect to an elastic cloud but I'm most probably getting the config file connections wrong since according to #76 it is possible to connect to an elastic cloud, is it possible for somebody to give an example of how the appender would look like while connecting to an elastic cloud server?

jptoto commented 6 years ago

@aadiwarden Can you tell me more about your cloud setup? AWS or GCP? Maybe I can duplicate the issue and check it out.

dhirajnayak commented 5 years ago

Trying to log to Elasticsearch on AWS, does not work. Following is the config - `

  <connectionString value="Scheme=http;Server=log;Index=log-myapp-test;Port=80;rolling=true" />
  <lossy value="false" />
  <bufferSize value="100" />
</appender>`
solstarz commented 5 years ago

Im also trying to log to Azure in my case, but its not working.

Is there a fix for this issue?

jptoto commented 5 years ago

@solstarz can you tell me more about your configuration? What are you trying to log to in Azure? A custom Elasticsearch cluster? What ports are exposed?

@dhirajnayak are you trying to log from outside of AWS or inside? Are your security groups setup correctly? What is the error you're seeing?

https://github.com/jptoto/log4net.ElasticSearch/wiki/04-Debugging-log4net.ElasticSearch The more logs we can have here the better.

solstarz commented 5 years ago

Hi @jptoto,

My config is a basic url on a LB with the default port 9200 with basic auth enabled. The Elastic stack is running on Kubernetes.

Were trying to sent dotnet logging to elasticsearch. I have created the index in elasticsearch where the entries can be logged, but for some unknown reason it fails.

jptoto commented 5 years ago

Right so we need to see what the exact error is. For example, if you created the index with the wrong types, the inserts may not work. Can you do some logging per my last link?

solstarz commented 5 years ago

@jptoto With what type should i create the index with? I added the code for debugging, but i dont see any errors in it..

jptoto commented 5 years ago

@solstarz it would actually be better if you didn't create the index at all and let log4net.Elasticsearch do it. Then Elasticsearch will set the types on its own. If that does not help and without logs I'm afraid I can't say what the problem might be.

a08maheshwari commented 3 years ago

I am facing a similar issue, I am using AWS Elastic Search Service with basic authentication, I tried everything from the link(https://github.com/jptoto/log4net.ElasticSearch/wiki/04-Debugging-log4net.ElasticSearch) as well, but it is not working Can you please confirm, it will work for AWS Elastic Search Service or not