Infrastructure/Fluentd

[Fluentd] 3. 설정 파라미터

상쾌한기분 2021. 5. 11. 14:44
728x90
반응형

설정 Common Parameter

@type

type 은 plugin 의 이름? 을 지정

<source>
  @type my_plugin_type
</source>

<filter>
  @type my_filter
</filter>

@id

id 는 설정의 unique 값으로, buffer, storage, logging 등에서 사용

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

@log_level

log_level 은 log의 level 을 지정으로

system 선언에서 전체 log_level(default:info) 를 지정할 수도 있고,
특정 플러그인의 log level을 선언할 수도 있다.

<system>
  log_level info
</system>

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

@label

label 은 filter, match 플러그인 상위에서 사용
특정 이름을 지정해서 route 역할

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

<label @access_log>
  <match **>
    @type file
    path ...
  </match>
</label>
728x90
반응형