在Debian下配置Filebeat的安全设置,可以遵循以下步骤:
sudo apt update
sudo apt install filebeat
/etc/filebeat/filebeat.yml
):add_host_metadata
、add_cloud_metadata
等。以下是一个参考配置示例,展示了如何在配置文件中设置一些基本的安全选项:
filebeat.inputs:
- type: log
enabled: true
paths:
- /logs/apps/prod/*.log
filebeat.config.modules:
path: { path.config } /modules.d/*.yml
reload.enabled: false
setup.template.settings:
index.number_of_shards: 1
setup.kibana:
host: "kibana-secure:5601"
output.elasticsearch:
hosts:
- "elasticsearch-secure:9200"
username: "elastic"
password: "your_secure_password"
ssl.enabled: true
ssl.certificate: "/path/to/your/certificate.pem"
ssl.key: "/path/to/your/key.pem"
processors:
- add_host_metadata:
when.not.contains.tags: forwarded
- add_cloud_metadata:
通过以上步骤和建议,可以在Debian上安全地运行Filebeat,并确保其日志收集和传输过程的安全性。