### 官方網站
[https://www.elastic.co/cn/beats/filebeat](https://www.elastic.co/cn/beats/filebeat)
## rpm安裝包
filebeat-7.16.2-x86_64.rpm
## 配置文件
filebeat.yml
```
# ============================== Filebeat inputs ===============================
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log
# Change to true to enable this input configuration.
enabled: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /var/log/*.log
- /var/log/messages
- type: syslog
format: auto
enabled: true
protocol.udp:
#host: "localhost:514"
host: "0.0.0.0:514"
#- c:\programdata\elasticsearch\logs\*
```
啟動filebeat,指定配置文件
`filebeat -e -c text.yml`
```
filebeat -e -c filebeat.yml
```
```
systemctl start filebeat #啟動服務
systemctl enable filebeat #filebeat開機自啟動
```
```
[root@457hu66h2ds69Z filebeat]# more /usr/lib/systemd/system/filebeat.service
[Unit]
Description=Filebeat sends log files to Logstash or directly to Elasticsearch.
Documentation=https://www.elastic.co/beats/filebeat
Wants=network-online.target
After=network-online.target
[Service]
UMask=0027
Environment="GODEBUG='madvdontneed=1'"
Environment="BEAT_LOG_OPTS="
Environment="BEAT_CONFIG_OPTS=-c /etc/filebeat/filebeat.yml"
Environment="BEAT_PATH_OPTS=--path.home /usr/share/filebeat --path.config /etc/filebeat --path.data /var/lib/filebeat --path.logs /var/log/filebeat"
ExecStart=/usr/share/filebeat/bin/filebeat --environment systemd $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS
Restart=always
[Install]
WantedBy=multi-user.target
```
- 寫在前面
- linux命令行
- 基礎篇
- 1.SSH連接工具
- 2.查看系統版本信息
- 3.查看IP地址
- 4.查看cpu信息
- 5.查看內存磁盤信息
- 6.文件上傳下載
- 7.linux中查找文件(find)
- 8.修改root賬號密碼
- 9.通過進程號查看端口
- 10.校驗MD5值
- 11.Linux命令之seq
- 12.Linux命令之corntab
- 13.linux命令之awk
- 進階篇
- 查看防火墻是否開啟
- linux創建新的用戶
- 更改文件的用戶組
- 查找JAVA_HOME路徑
- Linux主機時間同步
- 高CPU排查-個人總結
- Linux查看GPU性能
- 文件排序工具sort
- sed
- grep
- 實戰篇
- 1.Linux基線
- 2.iptables學習
- 3.Tcpdump抓包命令
- 4.CentOS7更換鏡像源
- shell腳本篇
- 1.Shell腳本速查手冊
- 2.Shell中獲取取昨天和多天前日期
- 3.rsync刪除文件
- 4.nginx自動化安裝腳本
- 5.后臺啟動服務
- 6.備份文件保留5天
- 數據庫
- MySQL數據庫備份命令
- ES數據庫備份
- filebeat工具
- packetbeat工具
- MySQL數據庫中刪除表
- Docker容器
- 1.安裝docker容器
- 2.docker容器的使用
- 3.docker overlay2 是存放什么的
- 4.docker刪除已停止的容器
- 5.docker網卡的IP地址修改
- Ubuntu容器下載vim,curl命令
- docker磁盤占用瞬間變大問題解決
- Python學習
- 安裝python環境
- Python 把代碼編譯成pyc文件