개요
Observability Pipelines의 Kafka 소스를 사용하여 Kafka 토픽에서 로그를 수신하세요. Kafka 소스는 librdkafka를 사용합니다.
Kafka 소스를 사용하여 Azure Event Hub 로그를 Observability Pipelines로 보낼 수도 있습니다.
전제 조건
To use Observability Pipelines’ Kafka source, you need the following information available:
- The hosts and ports of the Kafka bootstrap servers, which clients should use to connect to the Kafka cluster and discover all the other hosts in the cluster.
- The appropriate TLS certificates and the password you used to create your private key, if your forwarders are globally configured to enable SSL.
설정
시크릿 관리: Kafka 서버, 사용자 이름, 비밀번호 및 해당하는 경우 TLS 키 암호에 대한 식별자만 입력하세요. 실제 값은 입력하지 마세요.
파이프라인을 설정할 때 이 소스를 설정하세요. 파이프라인은 UI에서 설정할 수 있으며, API 또는 Terraform을 사용하여 설정할 수 있습니다. 이 섹션의 지침은 UI에서 소스를 설정하기 위한 것입니다.
파이프라인 UI에서 Kafka 소스를 선택한 후 다음 단계를 따르세요.
- Kafka 서버에 대한 식별자를 입력합니다. 비워두면 기본값이 사용됩니다.
- Kafka 사용자 이름에 대한 식별자를 입력합니다. 비워두면 기본값이 사용됩니다.
- Kafka 비밀번호에 대한 식별자를 입력합니다. 비워두면 기본값이 사용됩니다.
- 그룹 ID를 입력합니다.
- 토픽 이름을 입력합니다. 토픽이 두 개 이상인 경우 Add Field를 클릭하여 추가 토픽을 입력합니다.
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.
선택적 설정
SASL 인증 활성화
- 스위치를 전환하여 SASL Authentication을 활성화합니다.
- 드롭다운 메뉴에서 메커니즘(PLAIN, SCHRAM-SHA-256 또는 SCHRAM-SHA-512)을 선택합니다.
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.
추가 librdkafka 옵션 추가
- Advanced를 클릭한 다음 Add Option을 클릭합니다.
- 드롭다운 메뉴에서 옵션을 선택합니다.
- 해당 옵션에 대한 값을 입력합니다.
- librdkafka 문서에서 값을 확인하여 올바른 유형인지, 설정된 범위 내에 있는지 확인합니다.
- Add Option을 클릭하여 다른 librdkafka 옵션을 추가합니다.
시크릿 기본값
These are the defaults used for secret identifiers and environment variables.
- Kafka 부트스트랩 서버 식별자:
- 클라이언트가 Kafka 클러스터에 연결하고 클러스터의 다른 모든 호스트를 검색하는 데 사용하는 부트스트랩 서버를 참조합니다.
- 시크릿 관리자에서 호스트와 포트는
host:port 형식(예: 10.14.22.123:9092)으로 입력해야 합니다. 서버가 두 개 이상인 경우 쉼표를 사용하여 구분하세요. - 기본 식별자는
SOURCE_KAFKA_BOOTSTRAP_SERVERS입니다.
- Kafka SASL 사용자 이름 식별자:
- 기본 식별자는
SOURCE_KAFKA_SASL_USERNAME입니다.
- Kafka SASL 암호 식별자:
- 기본 식별자는
SOURCE_KAFKA_SASL_PASSWORD입니다.
- Kafka TLS 암호 식별자(TLS가 활성화된 경우):
- 기본 식별자는
SOURCE_KAFKA_KEY_PASS입니다.
- The host and port of the Kafka bootstrap servers.
- 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_SOURCE_KAFKA_BOOTSTRAP_SERVERS.
- SASL (when enabled):
- Kafka SASL username
- The default environment variable is
DD_OP_SOURCE_KAFKA_SASL_USERNAME.
- Kafka SASL password
- The default environment variable is
DD_OP_SOURCE_KAFKA_SASL_PASSWORD.
- Kafka TLS passphrase (when enabled):
- The default environment variable is
DD_OP_SOURCE_KAFKA_KEY_PASS.
librdkafka 옵션
사용 가능한 librdkafka 옵션은 다음과 같습니다.
- auto.offset.reset
- auto.commit.interval.ms
- client.id
- coordinator.query.interval.ms
- enable.auto.commit
- enable.auto.offset.store
- fetch.max.bytes
- fetch.message.max.bytes
- fetch.min.bytes
- fetch.wait.max.ms
- group.instance.id
- heartbeat.interval.ms
- queued.min.messages
- session.timeout.ms
- socket.timeout.ms
더 자세한 정보를 확인하고 값의 유형이 올바른지, 범위 내에 있는지 확인하려면 librdkafka 문서를 참조하세요.
상태 메트릭
모든 소스에서 내보내는 구성 요소 메트릭 및 소스 버퍼 메트릭은 파이프라인 사용량 메트릭 설명서를 참조하세요.
Kafka 메트릭
component_id 태그를 사용하여 개별 구성 요소별로 필터링하거나 그룹화하세요.component_type 태그는 이러한 메트릭에 대해 kafka입니다.
pipelines.kafka_consumer_lag- 설명: 토픽 및 파티션별 Kafka 소비자 지연입니다. 값이 높으면 소스가 들어오는 메시지 속도를 따라가지 못하고 있음을 나타냅니다.
- 메트릭 유형: 게이지
pipelines.kafka_consumed_messages_total- 설명: Worker가 Kafka 브로커에서 소비한 메시지 수입니다.
- 메트릭 유형: 카운트
pipelines.kafka_consumed_messages_bytes_total- 설명: Worker가 Kafka 브로커에서 소비한 메시지 바이트 수입니다.
- 메트릭 유형: 카운트
pipelines.kafka_requests_total- 설명: Worker가 Kafka 브로커로 보낸 요청 수입니다.
- 메트릭 유형: 개수
pipelines.kafka_requests_bytes_total- 설명: Worker가 Kafka 브로커로 보낸 바이트 수입니다.
- 메트릭 유형: 개수
pipelines.kafka_responses_total- 설명: Worker가 Kafka 브로커에 데이터를 쓴 후 수신한 응답 수입니다.
- 메트릭 유형: 개수
pipelines.kafka_responses_bytes_total- 설명: Worker가 Kafka 브로커에 데이터를 쓴 후 수신한 바이트 수입니다.
- 메트릭 유형: 개수