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

Observe 출력

원문 보기 위키 갱신

레코드를 HTTP 출력 플러그인으로 Observe에 플러시하고 싶을 때의 구성 방법입니다. 함께 살펴보겠습니다.

출처: 문서

본문

HTTP 출력 플러그인을 사용해 레코드를 Observe로 플러시하세요. MessagePack(또는 JSON) 형식의 데이터 레코드로 POST 요청을 발행합니다.

Configuration parameters

Observe와 관련된 HTTP 구성 파라미터는 다음과 같습니다:

Key Description Default
compress Sets the payload compression mechanism. Possible values: gzip, false. gzip
format The data format to be used in the HTTP request body. msgpack
header The specific header that provides the Observe token needed to authorize sending data into a data stream. Authorization Bearer ${OBSERVE_TOKEN}
header The specific header that instructs Observe how to decode incoming payloads. X-Observe-Decoder fluent
host IP address or hostname of the Observe data collection endpoint. Replace $(OBSERVE_CUSTOMER) with your Customer ID. OBSERVE_CUSTOMER.collect.observeinc.com
port TCP port to use when sending data to Observe. 443
tls Specifies whether to use TLS. on
tls.ca_file For Windows only: the path to the root cert. none
uri Specifies the HTTP URI for Observe. /v1/http/fluentbit
workers The number of workers to perform flush operations for this output. 0

구성 파일

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

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

pipeline:

  outputs:
    - name: http
      match: '*'
      host: my-observe-customer-id.collect.observeinc.com
      port: 443
      tls: on
      uri: /v1/http/fluentbit
      format: msgpack
      header:
        - 'Authorization     Bearer ${OBSERVE_TOKEN}'
        - 'X-Observe-Decoder fluent'
      compress: gzip
      # For Windows: provide path to root cert
      #tls.ca_file  C:\fluent-bit\isrgrootx1.pem

{% endtab %}

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

[OUTPUT]
    Name         http
    Match        *
    Host         my-observe-customer-id.collect.observeinc.com
    Port         443
    Tls          on

    Uri          /v1/http/fluentbit

    Format       msgpack
    Header       Authorization     Bearer ${OBSERVE_TOKEN}
    Header       X-Observe-Decoder fluent
    Compress     gzip

    # For Windows: provide path to root cert
    #tls.ca_file  C:\fluent-bit\isrgrootx1.pem

{% endtab %} {% endtabs %}

더 알아보기 (Learn more)