Elastic-agent add - error protocol integration http/https

Hi,

I have created a security policy for a windows computer and now I want to associate the windows computers with the "elastic-agent"... I have installed it as a service and I have specified, as indicated...

revision: 3
outputs:
  default:
    type: elasticsearch
    hosts:
      - 'https://10.172.211.30:9200'
    username: '{ES_USERNAME}'
    password: '{ES_PASSWORD}'

It doesn't connect - elasticsearch logs shows

received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress.

how can I solve that? Y
What authentication methods would you recommend for these cases?

Thank you very much

I think the config should be supported, but you could also try

revision: 3
outputs:
  default:
    type: elasticsearch
    hosts:
      - 10.172.211.30:9200
    protocol: https
    username: '{ES_USERNAME}'
    password: '{ES_PASSWORD}'

Morning,

I have made the changes but it is the same result

[WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [elastic-vm-1] received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/10.172.211.30:9200, remoteAddress=/192.168.254.20:12379}

Hi,

Sorry - error my. edit bad file configuration.

OK. I correct. the result has changed. now it gives me error in the ssl certificate.

Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate

I've added

cacert: 'ca.crt'

The service doesn't start - I guess I'm using an inappropriate command. How do I indicate the location of the ca.crt that must be used for communication?

thank you

You need to provide the ssl section, read more in the docs