【记录】logstash 命令解释

 

输入./bin/logstash --help 查看对应解释如下

-f  #意即文件,运行指定文件
#logstash 会自动读取 /etc/logstash.d/ 目录下所有 *.conf的文本文件,然后在自己内存里#拼接成一个完整的大配置文件,再去执行。
#logstash 列出目录下所有文件时,是字母排序的。而 logstash 配置段的 filter 和 output #都是顺序执行,所以顺序非常重要。
#采用多文件管理的用户,推荐采用数字编号方式命名配置文件
#同时在配置中,严谨采用 if 判断限定不同日志的动作。

-t #意即测试。用来测试 Logstash 读取到的配置文件语法是否能正常解析

-l #意即日志。Logstash 默认输出日志到标准错误。生产环境下你可以通过
#bin/logstash -l logs/logstash.log 命令来统一存储日志。

–pipeline-workers 或 -w
#运行 filter 和 output 的 pipeline 线程数量。默认是 CPU 核数。

–pipeline-batch-size 或 -b
#每个 Logstash pipeline 线程,在执行具体的 filter 和 output 函数之前,最多能累积的日#志条数。默认是 125 条。越大性能越好,同样也会消耗越多的 JVM 内存

–pipeline-batch-delay 或 -u
#每个 Logstash pipeline 线程,在打包批量日志的时候,最多等待几毫秒。默认是 #5ms。

–pluginpath 或 -P
#可以写自己的插件,然后用
#bin/logstash --pluginpath /path/to/own/plugins 
#加载它们。

–verbose
#输出一定的调试日志。

–debug
#输出更多的调试日志。

  

以上内容转载自:https://blog.csdn.net/jiankunking/article/details/67636487

 

以下为英文解释,大家自行理解

    -n, --node.name NAME          Specify the name of this logstash instance, if no value is given
                                  it will default to the current hostname.
                                   (default: "iZm5eca0xzt2utczjd2gupZ")
    -f, --path.config CONFIG_PATH Load the logstash config from a specific file
                                  or directory.  If a directory is given, all
                                  files in that directory will be concatenated
                                  in lexicographical order and then parsed as a
                                  single config file. You can also specify
                                  wildcards (globs) and any matched files will
                                  be loaded in the order described above.
    -e, --config.string CONFIG_STRING Use the given string as the configuration
                                  data. Same syntax as the config file. If no
                                  input is specified, then the following is
                                  used as the default input:
                                  "input { stdin { type => stdin } }"
                                  and if no output is specified, then the
                                  following is used as the default output:
                                  "output { stdout { codec => rubydebug } }"
                                  If you wish to use both defaults, please use
                                  the empty string for the '-e' flag.
                                   (default: nil)
    --field-reference-parser MODE Use the given MODE when parsing field
                                  references.
                                  
                                  The field reference parser is used to expand
                                  field references in your pipeline configs,
                                  and will be becoming more strict to better
                                  handle illegal and ambbiguous inputs in a
                                  future release of Logstash.
                                  
                                  Available MODEs are:
                                   - `LEGACY`: parse with the legacy parser,
                                     which is known to handle ambiguous- and
                                     illegal-syntax in surprising ways;
                                     warnings will not be emitted.
                                   - `COMPAT`: warn once for each distinct
                                     ambiguous- or illegal-syntax input, but
                                     continue to expand field references with
                                     the legacy parser.
                                   - `STRICT`: parse in a strict manner; when
                                     given ambiguous- or illegal-syntax input,
                                     raises a runtime exception that should
                                     be handled by the calling plugin.
                                  
                                   The MODE can also be set with
                                   `config.field_reference.parser`
                                  
                                   (default: "COMPAT")
    --modules MODULES             Load Logstash modules.
                                  Modules can be defined using multiple instances
                                  '--modules module1 --modules module2',
                                     or comma-separated syntax
                                  '--modules=module1,module2'
                                  Cannot be used in conjunction with '-e' or '-f'
                                  Use of '--modules' will override modules declared
                                  in the 'logstash.yml' file.
    -M, --modules.variable MODULES_VARIABLE Load variables for module template.
                                  Multiple instances of '-M' or
                                  '--modules.variable' are supported.
                                  Ignored if '--modules' flag is not used.
                                  Should be in the format of
                                  '-M "MODULE_NAME.var.PLUGIN_TYPE.PLUGIN_NAME.VARIABLE_NAME=VALUE"'
                                  as in
                                  '-M "example.var.filter.mutate.fieldname=fieldvalue"'
    --setup                       Load index template into Elasticsearch, and saved searches, 
                                  index-pattern, visualizations, and dashboards into Kibana when
                                  running modules.
                                   (default: false)
    --cloud.id CLOUD_ID           Sets the elasticsearch and kibana host settings for
                                  module connections in Elastic Cloud.
                                  Your Elastic Cloud User interface or the Cloud support
                                  team should provide this.
                                  Add an optional label prefix '

  

你可能感兴趣的:(【记录】logstash 命令解释)