본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Treasure Data 출력 플러그인

원문 보기 위키 갱신

레코드를 Treasure Data 클라우드 서비스로 보내고 싶을 때 쓰는 출력 플러그인입니다. 함께 살펴보겠습니다.

출처: 문서

본문

Treasure Data (TD) 출력 플러그인은 레코드를 Treasure Data 클라우드 서비스로 플러시할 수 있게 해 줍니다.

Configuration parameters

플러그인은 다음 구성 파라미터를 지원합니다:

Key Description Default
api The Treasure Data API key. To obtain it, log into the Console and in the API keys box, copy the API key hash. none
database Specify the name of your target database. none
region Set the service region. Allowed values: US, JP. US
Region Classic-mode spelling of region. Allowed values: us, jp. US
table Specify the name of your target table where the records will be stored. none
workers The number of workers to perform flush operations for this output. 0

시작하기

Treasure Data에 레코드 삽입을 시작하려면 명령줄에서 또는 구성 파일을 통해 플러그인을 실행하세요.

명령줄

명령줄에서 플러그인을 실행할 수 있지만, API 키가 노출됩니다. 구성 파일을 사용하는 것이 좋아요.

fluent-bit -i cpu -o td -p API="abc" -p Database="fluentbit" -p Table="cpu_samples"

구성 파일

주 구성 파일에 다음을 추가합니다:

{% tabs %} {% tab title="fluent-bit.yaml" %}

pipeline:
  inputs:
    - name: cpu
      tag: my_cpu

  outputs:
    - name: td
      match: '*'
      api: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
      database: fluentbit
      table: cpu_samples

{% endtab %}

{% tab title="fluent-bit.conf" %}

[INPUT]
  Name cpu
  Tag  my_cpu

[OUTPUT]
  Name     td
  Match    *
  API      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  Database fluentbit
  Table    cpu_samples

{% endtab %} {% endtabs %}

더 알아보기 (Learn more)