Plugin Common Parameters

本文介绍了Fluentd中常用插件参数的详细说明,包括所有插件可用的通用参数如类型、ID、日志级别等,以及仅适用于事件生成插件的标签参数。这些参数帮助用户更好地管理和调试配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Some common parameters are available for all (or a part of) Fluentd plugins. This page describes the list of these parameters.

Table of Contents

Parameters for all plugins

@type

The parameter @type is to specify the type of plugin for the section.

<source>
  @type my_plugin_type
</source>

<filter>
  @type my_filter
</filter>

@id

The @id parameter is used to add the unique name of plugin configuration, which is used for paths of buffer/storage, logging and other purposes.

<match>
  @type file
  @id   service_www_accesslog
  path  /path/to/my/access.log
  # ...
</match>

This parameter should be specified for all plugins to enable root_dir and workers feature globally.

See also: System Configuration.

@log_level

This parameter is to specify plugin-specific logging level. The default log level is info. Global log level can be specified by log_level in <system>, or -v/-q command line options. The @log_levelparameter overwrites logging level only for specified plugin instance.

<system>
  log_level info
</system>

<source>
  # ...
  @log_level debug  # show debug log only for this plugin
</source>

The main purposes of this parameter are:

  • Suppress too many logs only for that plugin
  • Show debug logs while debugging that plugin

Please see the logging article for further details.

Parameters for plugins which emit events

@label

The @label parameter is to route input events to <label> sections, the set of <filter> and <match>sections.

<source>
  @type  ...
  @label @access_logs
  # ...
</source>

<source>
  @type  ...
  @label @system_metrics
  # ...
</source>

<label @access_log>
  <match **>
    @type file
    path  ...
  </match>
</label>

<label @system_metrics>
  <match **>
    @type file
    path  ...
  </match>
</label>

The values of @label parameter MUST start with @ character.

Specifying @label is strongly recommended to route events to any plugins, without modifying tags. It can make the whole configurations simple.

Last updated: 2018-05-16 10:09:28 +0000

Versions |  v1.0 (td-agent3)

If this article is incorrect or outdated, or omits critical information, please let us knowFluentd is a open source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.

This happens when a goal of a plugin couldn't be configured. The most likely cause is that the contents of the <configuration> section for the plugin in your POM does not match the parameter types of the goal in question. E.g. trying to configure a numeric parameter from a string would trigger this error. So please verify that the configuration for the goal is correct by consulting the plugin documentation. The documentation for many common Maven plugins can be reached via our plugin index. While quite unlikely, it's also possible that the goal couldn't be configured because of a broken plugin class path. For instance, if the plugin class path is missing some dependencies of the plugin, this can result in linkage errors that prevent the configuration of the goal. To check whether the plugin JAR and its POM are intact, inspect your local repository which is usually located at ${user.home}/.m2/repository. For a plugin with the coordinates com.company:custom-maven-plugin:1.0, the file to check is com/company/custom-maven-plugin/1.0/custom-maven-plugin-1.0.jar and custom-maven-plugin-1.0.pom, respectively. If those files don't match the copies in the plugin repository, e.g. as noticeable by checksum mismatches, simply delete the local files and have Maven re-download it. If you have verified that your local copy of the JAR/POM and the JAR/POM in the plugin repository are bytewise identical but Maven still reports a linkage error, please report this to the maintainer of the plugin. 翻译
07-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值