filebeat系列-常用命令

命令语法:

https://www.elastic.co/guide/en/beats/filebeat/current/command-line-options.html

filebeat COMMAND SUBCOMMAND [FLAGS]
COMMAND:export,modules,run,setup,test,version,help

以下是常用的几种:

查看版本

./filebeat version

测试 

./filebeat test [command] -e        command:config   or   output

启动

sudo chown root filebeat.yml 
sudo ./filebeat -e

开启modules

./filebeat modules enable system nginx mysql

Global flags

-E "SETTING_NAME=VALUE",该配置作用于当前运行的filebeat进程,但是不会对配置文件中对应的SETTING_NAME项进行修改;例:

filebeat -E "name=mybeat111"

-c FILE  : 如果未指定,默认会运行filebeat.yml

-d SELECTORS : 对配置的selector 开启debug,如 -d "publish"

-e :  Logs to stderr and disables syslog/file output.如其意

--path.config : 设置configuration files路径

--path.data :设置data files 路径

--path.home : 设置home路径,用的较少

--path.logs :设置日志文件路径

--strict.perms : 设置是否对配置文件进行严格权限校验,默认--strict.perms=true

-v :输出日志信息级别

原文地址:https://www.cnblogs.com/yb38156/p/13048774.html