Splunk HTTP Event Collector(HEC) 목적지

개요

Observability Pipelines의 Splunk HTTP Event Collector(HEC) 목적지를 사용하여 Splunk HEC로 로그를 전송하세요.

참고: Observability Pipelines는 gzip(레벨 6) 알고리즘으로 로그를 압축합니다.

설정

시크릿 관리의 경우 Splunk HEC 토큰 및 엔드포인트의 식별자만 입력하세요. 실제 값을 입력하지 마세요.

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

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

  1. Token strategy 드롭다운 메뉴에서 다음을 설정합니다.
    • Splunk HEC 소스를 사용 중이고 소스에서 Store HEC token을 활성화한 경우에만 From Source를 선택합니다. 그렇지 않으면 오류가 발생하여 Worker 설치를 진행할 수 없습니다. 이 옵션은 Observability Pipelines에서 수신한 토큰을 Splunk HEC 목적지으로 전달합니다.
    • 기본 Custom 토큰 전략을 사용하는 경우 토큰의 식별자를 입력하세요. 비워두면 기본값이 사용됩니다.
  2. 엔드포인트 URL의 식별자를 입력합니다. 비워두면 기본값이 사용됩니다.
  3. 드롭다운 메뉴에서 Encoding을 선택합니다(JSON 또는 Raw).
    • JSON을 선택한 경우, 필요시 Add Field를 클릭하여 인덱싱된 필드로 추출할 필드를 지정하세요. Splunk HTTP Event Collector는 로그를 수집할 때 지정된 필드를 인덱싱합니다.
    • 참고: Raw 엔드포인트 대상은 Index Fields를 지원하지 않습니다.
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.

선택적 설정

Splunk 인덱스

데이터를 넣을 Splunk 인덱스의 이름을 입력하세요. 이 인덱스는 HEC에서 허용된 인덱스여야 합니다. 로그의 특정 필드를 기반으로 서로 다른 인덱스로 로그를 라우팅하려면 템플릿 구문을 참조하세요.

엔드포인트 대상

Endpoint Target 드롭다운 메뉴에서 Splunk HEC 엔드포인트를 선택하여 이벤트를 보냅니다.

  • Event(기본값): 자동 추출된 타임스탬프와 인덱싱된 필드를 지원하는 Splunk의 /event HEC 엔드포인트로 이벤트를 보냅니다.
  • Raw: Splunk의 /raw HEC 엔드포인트로 이벤트를 보냅니다.

타임스탬프 자동 추출

타임스탬프를 자동으로 추출할지 여부를 선택하세요. true로 설정하면 Splunk는 yyyy-mm-dd hh:mm:ss의 예상 형식으로 메시지에서 타임스탬프를 추출합니다.

참고: Raw 엔드포인트 대상은 Auto-extract timestamp를 지원하지 않습니다.

소스 유형 재정의

sourcetype을 설정하여 Splunk의 기본값을 재정의하세요. 기본값은 HEC 데이터의 경우 httpevent입니다. 로그의 특정 필드를 기반으로 로그를 다른 소스 유형으로 라우팅하려면 템플릿 구문을 참조하세요.

버퍼링

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.

시크릿 기본값

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

  • Splunk HEC token identifier:
    • References the Splunk HEC token for the Splunk indexer.
    • The default identifier is DESTINATION_SPLUNK_HEC_TOKEN.
  • Splunk HEC endpoint URL identifier:
    • References the Splunk HTTP Event Collector endpoint your Observability Pipelines Worker sends processed data to. For example, https://hec.splunkcloud.com:8088.
    • Note: /services/collector/event path is automatically appended to the endpoint.
    • The default identifier is DESTINATION_SPLUNK_HEC_ENDPOINT_URL.
  • Splunk HEC token:
    • The Splunk HEC token for the Splunk indexer. Note: Depending on your shell and environment, you may not want to wrap your environment variable in quotes.
    • The default environment variable is DD_OP_DESTINATION_SPLUNK_HEC_TOKEN.
  • Base URL of the Splunk instance:
    • The Splunk HTTP Event Collector endpoint your Observability Pipelines Worker sends processed data to. For example, https://hec.splunkcloud.com:8088. Note: /services/collector/event path is automatically appended to the endpoint.
    • The default environment variable is DD_OP_DESTINATION_SPLUNK_HEC_ENDPOINT_URL.

문제 해결

401 Unauthorized 오류

If the destination returns a 401 Unauthorized error, check the value stored for your Splunk HEC token identifier. Store only the token itself (for example, <GUID>).

상태 메트릭

모든 목적지에서 내보내는 구성 요소 메트릭 및 목적지 버퍼 메트릭에 대해서는 Pipelines 사용량 메트릭 문서를 참조하세요.

Splunk HEC 메트릭

  • component_id 태그를 사용하여 개별 구성 요소별로 필터링하거나 그룹화하세요.
  • component_type 태그는 Splunk HEC 메트릭의 경우 splunk_hec_logs입니다.
pipelines.splunk_pending_acks
설명: 응답을 기다리는 미해결 Splunk HEC 인덱서 승인 수입니다.
메트릭 유형: 게이지

목적지의 작동 방식

이벤트 배치 처리

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

최대 이벤트최대 크기(MB)타임아웃(초)
없음11