pinojs / pino-elasticsearch

🌲 load pino logs into Elasticsearch
MIT License
179 stars 67 forks source link

Added option for passing through the ssl options #45

Closed brilvio closed 3 years ago

brilvio commented 4 years ago

Now you can pass SSL options to pino-elasticsearch and he will pass to the Client. #44

mcollina commented 4 years ago

How is this going to be used? I think we should document it in the readme and possibly expose it to the CLI?

brilvio commented 4 years ago

From the documentation on the js client from elasticsearch: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/16.x/auth-reference.html

you can pass this object

 ssl: {
    ca: fs.readFileSync('./cacert.pem'),
    rejectUnauthorized: true
  }

In my case I am passing only the rejectUnauthorized: false in the object.

I can try to expose to the CLI, tomorrow.

mcollina commented 4 years ago

thanks, that’d be handy. I would also recommend adding a test using http://npm.im/proxyquire. Il 9 feb 2020, 14:18 +0000, Fernando Derkoski notifications@github.com, ha scritto:

From the documentation on the nodejs client from elasticsearch: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/16.x/auth-reference.html you can pass this object ssl: { ca: fs.readFileSync('./cacert.pem'), rejectUnauthorized: true } In my case I am passing only the rejectUnauthorized: false in the object. I can try to expose to the CLI, tomorrow. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

chill-cod3r commented 4 years ago

I am also in need of this feature. Is this still being actively worked on?

mcollina commented 4 years ago

I don't think so. Would you like to send a fresh PR?

chill-cod3r commented 4 years ago

Sure thing. I'm going to wrap up the other PR I have first and then would be happy to

mcollina commented 3 years ago

Closed for no activity, feel free to reopen if you are still interested.