How to push log from Filebeat to Logstash/Elasticsearch affer setting secure TSL?

Dear all,
I configured Encrypt traffic between Kibana and Elasticsearch successfully and now I can start Kibana (not yet https) and connected Elasticsearch

Here is Elasticsearch's setting:
discovery.seed_hosts: [] true true certificate required elastic-certificates.p12 elastic-certificates.p12 true http.p12

But I don't know how to connect Filebeat to Logstash or Elasticsearch after setting security for Elasticsearch. I try config Filebeat to connect with Elasticsearch but fail:

  # Array of hosts to connect to.
  hosts: [""]

  # Protocol - either `http` (default) or `https`.
  protocol: "https"
  #ssl_verification_mode: "none"

  # Authentication credentials - either API key or username/password.
  #api_key: "id:api_key"
  username: "beats_system"
  password: "XXXXXXXXX"

Error of filebeat:

2021-10-22T11:31:26.174+0700    ERROR   [esclientleg]   transport/logging.go:37 Error dialing x509: certificate signed by unknown authority     {"network": "tcp", "address": ""}
2021-10-22T11:31:27.751+0700    ERROR   [publisher_pipeline_output]     pipeline/output.go:154  Failed to connect to backoff(elasticsearch( Get "": $
2021-10-22T11:31:27.751+0700    INFO    [publisher_pipeline_output]     pipeline/output.go:145  Attempting to reconnect to backoff(elasticsearch( with 1 reconnect attempt(s)
2021-10-22T11:31:27.751+0700    INFO    [publisher]     pipeline/retry.go:219   retryer: send unwait signal to consumer
2021-10-22T11:31:27.751+0700    INFO    [publisher]     pipeline/retry.go:223     done

I use username/password to authenticate with Elasticsearch but the log show about unknow certificate.
How can I connect Filebeat with Elasticseach (or Logstash) with secure setting?
Thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.