jkerry / sensu-go-elasticsearch

an elasticsearch metric handler for sensu go
MIT License
2 stars 5 forks source link

Support for providing CA Certificate when Elastic endpoint uses https #13

Open sasubillis opened 4 years ago

sasubillis commented 4 years ago

If you use HTTPS Elastic endpoint, it fails to connect with x509: certificate signed by unknown authority.

Following is the error message

May 12 21:22:27 sensugo-stage-master01 sensu-backend[8434]: {"assets":["sensu-go-elasticsearch"],"check":"check-process-app","component":"pipelined","entity":"logstash-stage-c01","event_uuid":"33cf40e5-93e8-46e7-aa4e-227360c87067","handler":"check_resuts_to_elastic","level":"info","msg":"event pipe handler executed","namespace":"sre","output":"Error: error sending metric data to elasticsearch: Error getting response: x509: certificate signed by unknown authority\nUsage:\n sensu-go-elasticsearch [flags]\n\nFlags:\n -d, --dated_index Should the index have the current date postfixed? ie: metric_data-2019-06-27\n -f, --full_event_logging send the full event body instead of isolating event metrics\n -h, --help help for sensu-go-elasticsearch\n -i, --index string metric_data\n -p, --point_name_as_metric_name use the entire point name as the metric name\n\nerror: error sending metric data to elasticsearch: Error getting response: x509: certificate signed by unknown authority\n","status":1,"time":"2020-05-12T21:22:27Z"}

nixwiz commented 4 years ago

My fork with this support is on GitHub and Bonsai.

akadari commented 4 years ago

Thanks