statusengine / worker

PHP worker process that writes all event data to a storage backend
https://statusengine.org/worker/#overview
GNU General Public License v3.0
9 stars 8 forks source link

Elastic Authentication? #21

Closed steaksauce- closed 5 years ago

steaksauce- commented 5 years ago

Elastic recently made security available with their basic license (https://www.elastic.co/blog/security-for-elasticsearch-is-now-free). As such, I decided to attempt an Elastic backend with security enabled on Elastic. However, I get a non-fatal error when restarting the worker:

statusengine-worker[17621]: No alive nodes found in your cluster
statusengine-worker[17621]: Elasticsearch error!

I did some basic troubleshooting on the Elastic server and found that I now have to authenticate to Elastic (I feel stupid for not realizing this sooner).

So my problem is this: is there a way to configure Elastic authentication on the statusengine-worker? I don't see anything in the documentation. I pilfered through #1 and didn't see any mention of it there either.

nook24 commented 5 years ago

Have you already tried to pass it as the elastic docs describes?

Can you please try if passing the host as

elasticsearch_address: http://username@password@10.10.10.10

in your config.yml works?

Also make sure to follow the ES6 guide and install elasticsearch 6.x php drivers. https://statusengine.org/tutorials/Elasticsearch6-Perfdata-Backend/

steaksauce- commented 5 years ago

I will give those a try, but in doing so I found that my elastic instance was listening on localhost, and not bound to the IP. I'm having the hardest time getting elastic to listen on anything but localhost and will update when I figure this out.

steaksauce- commented 5 years ago

Seems like a combination of selinux and a misconfiguration on the elastic node caused my troubles.

Using the defined method of elasticsearch_address: http://username:password@10.10.10.10 works. Thanks!