markmcdowell / NLog.Targets.ElasticSearch

NLog target for Elasticsearch
MIT License
176 stars 89 forks source link

How to set Configration,write log to aws Elastic Search #134

Closed foreverhot1019 closed 2 years ago

foreverhot1019 commented 3 years ago

I want to write logs to aws Elastic Search。 my nlog config <target name="ElasticSearch" xsi:type="BufferingWrapper" flushTimeout="1"> <target xsi:type="ElasticSearch" uri="https://*.ap-northeast-1.es.amazonaws.com" includeAllProperties ="true" index="NServiceB_${date:format=yyyy-MM-dd}" requireAuth="true" username="AKIAQFGRRF6DWINHH2HR" password="qiV7K53hQDN23vjoDmESm+hFRxR0HlZb4wn0Znj2" /> </target> username="AKIAQFGRRF6DWINHH2HR" //access_key_id password="qiV7K53hQDN23vjoDmESm+hFRxR0HlZb4wn0Znj2" />//secret_access_key

raaj-repos commented 3 years ago

I think the username/password with access_key and secret_access_key is NOT going to work. For now, please change the Authentication from ARN to Create master user. The use that credential and it should work.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

snakefoot commented 3 years ago

Notice NLog.Targets.ElasticSearch .ver 7.6.0 includes the options ApiKeyId + ApiKey for use with ApiKeyAuthenticationCredentials.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.