vanthome / winston-elasticsearch

An elasticsearch transport for winston
MIT License
270 stars 131 forks source link

Support for OpenSearch clients #210

Closed qolity closed 2 years ago

qolity commented 2 years ago

As you are probably aware, OpenSearch has been forked as the open-source continuation of Elasticsearch due to Elastic co changing the license terms. https://github.com/opensearch-project/OpenSearch

We upgraded the log services to use OpenSearch as a result, but the Elasticsearch client that winston-elasticsearch uses now emits a warning:

Warning: The client is unable to verify that the server is Elasticsearch due to security privileges on the server side. Some functionality may not be compatible if the server is running an unsupported product.\n at /usr/app/node_modules/@elastic/elasticsearch/lib/Transport.js:558:19\n at onBody (/usr/app/node_modules/@elastic/elasticsearch/lib/Transport.js:351:9)\n at IncomingMessage.onEnd (/usr/app/node_modules/@elastic/elasticsearch/lib/Transport.js:275:11)\n at IncomingMessage.emit (events.js:412:35)\n at endReadableNT (internal/streams/readable.js:1334:12)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)

If possible adding support for Opensearch would a great feature to have if they are drop-in replacements. Otherwise perhaps time for a fork.

vanthome commented 2 years ago

I'm not inclined to support bad actors like Amazon by adapting this software for them. Feel free to create a PR and I would add it.

epechuzal commented 2 years ago

@vanthome you dont need to support it as this package already works with opensearch

If you get too many issues or questions on it then the easy workaround to tell people is to just create an opensearch client and feed it to the client attribute in the transport opts

vanthome commented 2 years ago

@epechuzal yes, that is what I have expected anyways that it works. thx for confirming.