filebeat 是go语言编写的轻量日志收集工具,建议和elk 其他组件版本保持一致
| cat filebeat.yml |
| |
| filebeat.inputs: |
| - type: log |
| enabled: true |
| paths: |
| |
| - /var/log/messages |
| fields: |
| |
| type: host-message |
| - type: log |
| enabled: true |
| paths: |
| - /var/log/secure |
| fields: |
| type: host-secure |
| filebeat.config.modules: |
| path: ${path.config}/modules.d/*.yml |
| reload.enabled: false |
| setup.template.settings: |
| index.number_of_shards: 1 |
| setup.kibana: |
| output.kafka: |
| hosts: ["101.43.43.9:9092"] |
| topic: '%{[fields.type]}' |
| required_acks: 1 |
| compression: gzip |
| |
| max_message_bytes: 100000 |
| |
| |
| |
| |
| |
| |
启动服务
| filebeat -e -c /etc/filebeat/filebeat.yml \ |
| -path.home /opt/filebeat \ |
| -path.config /etc/filebeat \ |
| -path.data /var/lib/filebeat \ |
| -path.logs /var/log/filebeat & |
Type |
Description |
Default Location |
Config Option |
home |
Home of the Filebeat installation. |
|
path.home |
bin |
The location for the binary files. |
{path.home}/bin |
|
config |
The location for configuration files. |
{path.home} |
path.config |
data |
The location for persistent data files. |
{path.home}/data |
path.data |
logs |
The location for the logs created by Filebeat. |
{path.home}/logs |
path.logs |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏