Kafka 목적지

이용 가능:

로그

개요

Observability Pipelines의 Kafka 목적지를 사용하여 Kafka 토픽으로 로그를 전송하세요.

이 목적지를 사용하는 경우

이 목적지를 사용할 수 있는 일반적인 시나리오는 다음과 같습니다.

  • 다음 목적지로 로그를 라우팅하려면 다음 단계를 따르세요.
    • Clickhouse: 대량의 로그를 분석하는 데 사용되는 오픈 소스 열 지향 데이터베이스 관리 시스템입니다.
    • Snowflake: 저장 및 쿼리에 사용되는 데이터 웨어하우스입니다.
      • Snowflake의 API 통합은 Kafka를 통해 플랫폼으로 로그를 수집합니다.
    • Databricks: 분석 및 저장용 데이터 레이크하우스입니다.
    • Azure Event Hub: Microsoft 및 Azure 에코시스템의 수집 및 처리 서비스입니다.
  • Kafka로 데이터를 라우팅하고 Kafka Connect 에코시스템을 사용합니다.
  • Kafka를 통해 Apache Spark로 라우팅하여 데이터 분석과 머신러닝 워크로드 실행을 시작하기 전, Observability Pipelines로 데이터를 처리하고 정규화합니다.

설정

시크릿 관리: Kafka 부트스트랩 서버에 대한 식별자, 그리고 해당하는 경우 SASL 사용자 이름 및 비밀번호, TLS 키 암호에 대한 식별자만 입력하세요. 실제 값을 입력하지 마세요.

파이프라인을 설정할 때 Kafka 목적지를 구성합니다. 파이프라인은 UI에서 설정할 수 있으며, API 또는 Terraform을 통해 설정할 수 있습니다. 이 섹션에서 설명한 단계는 UI로 구성했습니다.

파이프라인 UI에서 Kafka 목적지를 선택한 후 다음 단계를 따르세요.

  1. Kafka 부트스트랩 서버에 대한 식별자를 입력합니다. 비워두면 기본값이 사용됩니다.
  2. 로그를 전송하려는 토픽의 이름을 입력합니다.
  3. 드롭다운 메뉴에서 출력 형식으로 EncodingJSON 또는 Raw message를 선택합니다.
샘플 값이 포함된 Kafka 목적지
If you enter secret identifiers and then choose to use environment variables, the environment variable is the identifier entered and prepended with DD_OP_. For example, if you entered PASSWORD_1 for a password identifier, the environment variable for that password is DD_OP_PASSWORD_1.

선택적 설정

TLS 활성화

Toggle the switch to Enable TLS.

  • If you are using Secrets Management, enter the identifier for the key pass. See Secret defaults for the default used if the field is left blank.
  • Enter the following certificate and key files:
    • Server Certificate Path: The path to the certificate file that has been signed by your Certificate Authority (CA) root file in DER, PEM, or CRT (X.509).
    • (Optional) CA Certificate Path: The path to the certificate file that is your Certificate Authority (CA) root file in DER, PEM, or CRT (X.509).
    • (Optional) Private Key Path: The path to the .key private key file that belongs to your Server Certificate Path in DER, PEM, or CRT (PKCS #8) format.
    • Notes:
      • The configuration data directory /var/lib/observability-pipelines-worker/config/ is automatically appended to the file paths. See Advanced Worker Configurations for more information.
      • The file must be readable by the observability-pipelines-worker group and user.
SASL 인증 활성화
  1. 스위치를 전환하여 SASL Authentication을 활성화합니다.
  2. Kafka SASL 사용자 이름과 비밀번호의 식별자를 입력합니다. 비워두면 기본값이 사용됩니다.
  3. 드롭다운 메뉴에서 메커니즘(PLAIN, SCHRAM-SHA-256 또는 SCHRAM-SHA-512)을 선택합니다.
압축 활성화
  1. 스위치를 Enable Compression으로 전환합니다.
  2. 드롭다운 메뉴에서 Compression Algorithm압축 알고리즘(gzip, zstd, lz4 또는 snappy)을 선택합니다.
  3. (선택 사항) 드롭다운 메뉴에서 Compression Level을 선택합니다. 수준을 지정하지 않으면 알고리즘의 기본값이 사용됩니다.
버퍼링

Toggle the switch to enable Buffering Options. Enable a configurable buffer on your destination to ensure intermittent latency or an outage at the destination doesn’t create immediate backpressure, and allow events to continue to be ingested from your source. Disk buffers can also increase pipeline durability by writing data to disk, ensuring buffered data persists through a Worker restart. See Destination buffers for more information.

  • If left unconfigured, your destination uses a memory buffer with a capacity of 500 events.
  • To configure a buffer on your destination:
    1. Select the buffer type you want to set (Memory or Disk).
    2. Enter the buffer size and select the unit.
      1. Maximum memory buffer size is 128 GB.
      2. Maximum disk buffer size is 5 TB.
        • Note: For Worker versions 2.20.x and older, the maximum disk buffer size is 500 GB.
    3. In the Behavior on full buffer dropdown menu, select whether you want to block events or drop new events when the buffer is full.
고급 옵션

Advanced을 클릭하여 다음 필드 중 하나를 설정합니다.

  1. Message Key Field: 파티셔닝, 그룹화, 정렬에 필요한 메시지 키가 포함된 로그 필드를 지정합니다.
  2. Headers Key: Kafka 헤더가 포함된 로그 필드를 지정합니다. 비워두면 헤더가 기록되지 않습니다.
  3. Message Timeout (ms): 로컬 메시지 시간 초과(밀리초 단위)입니다. 기본값은 300,000 ms입니다.
  4. Socket Timeout (ms): 네트워크 요청에 대한 기본 시간 초과(밀리초 단위)입니다. 기본값은 60,000 ms입니다.
  5. Rate Limit Events: Kafka 클라이언트가 속도 제한 시간 내에 전송할 수 있는 최대 요청 수입니다. 기본값은 속도 제한이 없습니다.
  6. Rate Limit Time Window (secs): 속도 제한 옵션에 사용되는 기간입니다.
    • 이벤트 속도 제한이 설정되지 않은 경우 이 설정은 적용되지 않습니다.
    • 기본값은 1 second가 설정되어 있고 Rate Limit Events는 설정되지 않은 경우 Rate Limit Time Window입니다.
  7. librdkafka 옵션을 추가하려면 Add Option을 클릭하여 드롭다운 메뉴에서 옵션을 선택합니다.
    1. 해당 옵션에 대한 값을 입력합니다.
    2. librdkafka 설명서에서 값을 확인하여 올바른 유형인지, 설정된 범위 내에 있는지 확인합니다.
    3. Add Option을 클릭하여 다른 librdkafka 옵션을 추가합니다.

시크릿 기본값

These are the defaults used for secret identifiers and environment variables.

  • Kafka 부트스트랩 서버 식별자:
    • 클라이언트가 Kafka 클러스터에 연결하고 클러스터의 다른 모든 호스트를 검색하는 데 사용하는 부트스트랩 서버를 참조합니다.
    • 시크릿 관리자에서 호스트와 포트는 host:port 형식(예: 10.14.22.123:9092)으로 입력해야 합니다. 서버가 두 개 이상인 경우 쉼표를 사용하여 구분하세요.
    • 기본 식별자는 DESTINATION_KAFKA_BOOTSTRAP_SERVERS입니다.
  • Kafka TLS 암호 식별자(TLS가 활성화된 경우):
    • 기본 식별자는 DESTINATION_KAFKA_KEY_PASS입니다.
  • SASL 인증(활성화된 경우):
    • Kafka SASL 사용자 이름 식별자:
      • 기본 식별자는 DESTINATION_KAFKA_SASL_USERNAME입니다.
    • Kafka SASL 암호 식별자:
      • 기본 식별자는 DESTINATION_KAFKA_SASL_PASSWORD입니다.
Kafka 환경 변수 필드가 표시된 설치 페이지

Kafka bootstrap servers

  • The host and port of the Kafka bootstrap servers.
  • This is the bootstrap server that the client uses to connect to the Kafka cluster and discover all the other hosts in the cluster. The host and port must be entered in the format of host:port, such as 10.14.22.123:9092. If there is more than one server, use commas to separate them.
  • The default environment variable is DD_OP_DESTINATION_KAFKA_BOOTSTRAP_SERVERS.

TLS (when enabled)

  • If TLS is enabled, the Kafka TLS passphrase is needed.
  • The default environment variable is DD_OP_DESTINATION_KAFKA_KEY_PASS.

SASL (when enabled)

  • Kafka SASL username
    • The default environment variable is DD_OP_DESTINATION_KAFKA_SASL_USERNAME.
  • Kafka SASL password
    • The default environment variable is DD_OP_DESTINATION_KAFKA_SASL_PASSWORD.

librdkafka 옵션

사용 가능한 librdkafka 옵션은 다음과 같습니다.

  • client.id
  • queue.buffering.max_messages
  • transactional.id
  • enable.idempotence
  • acks

더 자세한 정보를 확인하고 값의 유형이 올바른지, 범위 내에 있는지 확인하려면 librdkafka 설명서를 참조하세요.

상태 메트릭

모든 목적지에서 내보내는 구성 요소 메트릭 및 목적지 버퍼 메트릭은 파이프라인 사용량 메트릭 설명서를 참조하세요.

Kafka 메트릭

  • component_id 태그를 사용하여 개별 구성 요소별로 필터링하거나 그룹화하세요.
  • Kafka 목적지 메트릭에서 component_type 태그 값은 kafka입니다.
pipelines.kafka_produced_messages_total
설명: 생성 후 Kafka 브로커로 전송된 메시지 수입니다.
메트릭 유형: 개수
pipelines.kafka_produced_messages_bytes_total
설명: 생성 후 Kafka 브로커로 전송된 메시지 바이트 수입니다.
메트릭 유형: 개수
pipelines.kafka_queue_messages
설명: 현재 librdkafka 프로듀서 대기열에 있는 메시지 수입니다.
메트릭 유형: 게이지
pipelines.kafka_queue_messages_bytes
설명: 현재 librdkafka 프로듀서 대기열에 있는 메시지의 총 크기(바이트)입니다.
메트릭 유형: 게이지
pipelines.kafka_requests_total
설명: Kafka 브로커로 전송된 요청 수입니다.
메트릭 유형: 개수
pipelines.kafka_requests_bytes_total
설명: Kafka 브로커로 보낸 바이트 수입니다.
메트릭 유형: 개수
pipelines.kafka_responses_total
설명: Kafka 브로커로부터 수신한 응답 수입니다.
메트릭 유형: 개수
pipelines.kafka_responses_bytes_total
설명: Kafka 브로커로부터 수신한 바이트 수입니다.
메트릭 유형: 개수

이벤트 배치 처리

이벤트 배치는 다음 중 하나의 파라미터를 충족하면 플러시됩니다. 자세한 내용은 목적지 이벤트 배치 처리를 참조하세요.

최대 이벤트최대 크기(MB)타임아웃(초)
10,00011