Securing Filebeat output with TLS encrypts data in transit. Whether sending to Elasticsearch or Logstash, TLS ensures confidentiality and integrity of logs.
Filebeat allows specifying CA certificates, client certificates, and keys. With proper trust established, data flows securely end-to-end.
Enabling TLS aligns with security best practices, guarding against interception and tampering.
Steps to enable SSL/TLS in Filebeat:
- Obtain the CA certificate or server certificate to trust.
- Place the certificate files in a secure directory with correct permissions.
Use full paths in filebeat.yml to reference these certificates.
- Edit filebeat.yml and configure output.elasticsearch or output.logstash to use ssl.certificate_authorities.
$ sudo nano /etc/filebeat/filebeat.yml (no direct output)
Set ssl.verification_mode: full for strict certificate checks.
- Test the configuration.
$ sudo filebeat test config Config OK
Certificate mismatches or expired certs cause connection failures.
- Restart Filebeat.
$ sudo systemctl restart filebeat (no output)
Check destination logs to confirm secure, encrypted communication.

Author: Mohd
Shakir Zakaria
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Discuss the article:
Comment anonymously. Login not required.