# 커스텀 로그

## 개요

Panther는 자체 맞춤 로그 스키마를 정의할 수 있게 해줍니다. 맞춤 로그는 을(를) 통해 Panther로 수집할 수 있으며, 그런 다음 맞춤 스키마가 데이터를 정규화하고 분류합니다. [데이터 전송](https://docs.panther.com/ko/data-onboarding/data-transports)및, 그런 다음 맞춤 스키마가 데이터를 정규화하고 분류합니다.

이 페이지는 필요한 맞춤 스키마 수를 결정하고, 맞춤 스키마를 추론하고 작성하며 관리하는 방법과 를 사용하여 스키마를 업로드하는 방법을 설명합니다. [Panther 분석 도구(PAT)](https://docs.panther.com/ko/panther/detections-repo/pat)에 대한 정보는 `pantherlog` 를 사용하여 맞춤 스키마로 작업하는 방법은 를 참조하세요. [`pantherlog` CLI 도구](https://docs.panther.com/ko/panther/pantherlog).

맞춤 스키마는 로 식별됩니다 `사용자 정의.` 이름에 접두사가 붙으며 네이티브로 지원되는 로그 유형이 사용되는 모든 곳에서 사용할 수 있습니다:

* 로그 수집
  * 다음을 통해 맞춤 로그를 온보드할 수 있습니다 [데이터 전송](https://docs.panther.com/ko/data-onboarding/data-transports) (예: HTTP 웹후크, S3, SQS, Google Cloud Storage, Azure Blob Storage)
* 디텍션
  * 작성할 수 있습니다 [룰 및 예약 룰](https://docs.panther.com/ko/detections/rules) 맞춤 스키마에 대해.
* 조사(Investigations)
  * 다음에서 데이터를 쿼리할 수 있습니다 [로그 소스가 구성된 후에는 수집된 데이터를 사용하여 검색할 수 있습니다](https://docs.panther.com/ko/search/search-tool) 및 [panther\_monitor](https://docs.panther.com/ko/search/data-explorer). Panther는 해당 스키마를 사용하는 소스를 온보드하면 맞춤 스키마에 대한 새 테이블을 생성합니다.

## 필요한 맞춤 스키마 수 결정

맞춤 소스에서 오는 데이터를 나타내기 위해 몇 개의 스키마가 필요한지 결정하는 명확한 규칙은 없습니다. 이는 다양한 로그 이벤트의 의도와 그들 간 필드 중복 정도에 따라 다릅니다.

일반적으로 각 로그 유형의 형상이 자체 스키마로 표현되도록 필요한 최소 수의 스키마를 만드는 것이 권장됩니다(같은 스키마로 표현될 수 있도록 로그 유형 간에 일부 필드 차이가 허용되는 여지를 둠). 실무 규칙으로는: 예를 들어 두 가지 다른 유형의 로그(예: 애플리케이션 감사 로그와 보안 알러트)가 필수 필드에서 50% 미만으로 중복된다면 서로 다른 스키마를 사용해야 합니다.

아래 표에서 예시 시나리오와 해당 스키마 권장사항을 참조하세요:

<table data-full-width="false"><thead><tr><th width="343">시나리오</th><th>스키마 권장사항</th></tr></thead><tbody><tr><td>필드가 있는 하나의 유형의 로그가 있습니다 <code>A</code>, <code>B</code>및 <code>C</code>그리고 필드가 다른 유형의 로그가 있습니다 <code>X</code>, <code>Y</code>및 <code>Z</code>.</td><td><p>각 로그 유형마다 하나씩, 두 개의 서로 다른 스키마를 만드세요.</p><p>기술적으로는 모든 필드(을)를 포함한 하나의 스키마를 만들고<code>A</code>, <code>B</code>, <code>C</code>, <code>X</code>, <code>Y</code>, <code>Z</code>를 선택적(예: <code>required: false</code>)로 표시할 수 있지만, 이는 권장되지 않습니다. 감지 규칙 작성 및 검색과 같은 하류 작업이 더 어려워지기 때문입니다.</p></td></tr><tr><td>항상 필드가 있는 하나의 유형의 로그가 있고 <code>A</code>, <code>B</code>및 <code>C</code>항상 필드가 있는 다른 유형의 로그가 있습니다 <code>A</code>, <code>B</code>및 <code>Z</code>.</td><td>필드가 있는 하나의 스키마를 만드세요, <code>A</code> 와 <code>B</code> 를 필수로 표시하고 필드 <code>C</code> 와 <code>Z</code> 를 선택적로 표시하세요.</td></tr></tbody></table>

필요한 스키마 수를 결정한 후 스키마를 정의할 수 있습니다.

{% hint style="info" %}
스키마가 하나 이상 필요하다고 판단되었고 Panther의 [스키마 추론 도구](#automatically-infer-the-schema-in-panther) 를 사용하여 스키마를 생성하려는 경우 다음 중 하나를 수행하는 것이 권장됩니다:

* 다음을 사용하세요 [샘플 로그에서 맞춤 스키마 추론](#inferring-a-custom-schema-from-sample-logs) 방법을 여러 번 서로 다른 로그 유형 샘플로 사용
* 다른 구조의 데이터를 S3 버킷의 별도 폴더로 전송한 다음, [이력 S3 데이터에서 맞춤 스키마 추론](#inferring-custom-schemas-from-historical-s3-data) 추론 방법

다음 중 어느 것을 사용하든 [Panther에서 수신된 S3 데이터에서 맞춤 스키마 추론](#inferring-a-custom-schema-from-s3-data-received-in-panther) 이전에 생성한 Snowflake 사용자 이름, 예를 들면 [Panther에서 수신된 HTTP 데이터에서 맞춤 스키마 추론](#inferring-a-custom-schema-from-http-data-received-in-panther) 방법을 사용하면 소스로 전송된 모든 로그 유형을 대표하는 단일 스키마를 Panther가 생성할 위험이 있습니다.
{% endhint %}

## 맞춤 스키마를 정의하는 방법

{% hint style="info" %}
맞춤 로그 유형의 경우 Panther는 JSON, XML 또는 CSV(헤더 유무 상관없음) 형식으로 전송된 데이터 수집을 지원합니다. 단, [스키마 추론](#automatically-infer-the-schema-in-panther)의 경우 Panther는 헤더 없는 CSV를 지원하지 않습니다.
{% endhint %}

맞춤 스키마를 정의하는 방법은 여러 가지가 있습니다. 다음을 수행할 수 있습니다:

* 데이터에서 하나 이상의 스키마를 추론: 참조 [Panther에서 스키마 자동 추론](#automatically-infer-the-schema-in-panther).
* 스키마를 수동으로 생성: 참조 [스키마 직접 생성](#create-the-schema-yourself).

## Panther에서 스키마 자동 추론

스키마를 수동으로 작성하는 대신 Panther 콘솔이나 `pantherlog` CLI 도구가 데이터에서 스키마(또는 여러 스키마)를 추론하도록 할 수 있습니다.

Panther가 스키마를 추론할 때, 데이터 샘플에 다음이 있는 경우 유의하세요:

* 형이 `object인 필드가` 200개 이상의 필드를 포함하면 해당 필드는 `json 형으로 분류됩니다.`.
* 혼합 데이터 유형을 가진 필드(예: 여러 데이터 유형을 갖는 배열이거나 필드 자체가 다양한 데이터 유형을 갖는 경우)가 있으면 해당 필드는 `json 형으로 분류됩니다.`.

### 형으로 분류됩니다.

스키마를 추론하는 방법

* Panther에서 스키마를 추론하는 방법은 여러 가지가 있습니다:
  * Panther 콘솔에서: [샘플 로그에서 맞춤 스키마 추론](#inferring-a-custom-schema-from-sample-logs) 업로드한 샘플 데이터에서 스키마를 추론하려면 아래의
  * 탭을 참조하세요. [Panther에서 수신된 S3 데이터에서 맞춤 스키마 추론](#inferring-a-custom-schema-from-s3-data-received-in-panther) 업로드한 샘플 데이터에서 스키마를 추론하려면 아래의
  * Panther에서 수신된 S3 데이터에서 스키마를 추론하려면 [이력 S3 데이터에서 맞춤 스키마 추론](#inferring-custom-schemas-from-historical-s3-data) 업로드한 샘플 데이터에서 스키마를 추론하려면 아래의
  * 을 참조하세요. [Panther에서 수신된 HTTP 데이터에서 맞춤 스키마 추론](#inferring-a-custom-schema-from-http-data-received-in-panther) 업로드한 샘플 데이터에서 스키마를 추론하려면 아래의
* 이력 S3 데이터에서 하나 이상의 스키마를 추론하려면
  * 다음을 사용하세요 [`을 참조하세요.`](https://docs.panther.com/ko/panther/pantherlog#infer-generate-a-schema-from-json-log-samples) Panther에서 수신된 HTTP 데이터에서 스키마를 추론하려면

{% tabs %}
{% tab title="을 참조하세요." %}
**샘플 로그에서 맞춤 스키마 추론**

CLI 워크플로우에서: [pantherlog infer](https://docs.panther.com/ko/panther/pantherlog#infer-generate-a-schema-from-json-log-samples).

명령을 사용하세요.

1. Panther 콘솔에 로그인합니다.
2. 샘플 로그 **샘플 로그를 Panther 콘솔에 업로드하여 스키마를 생성할 수 있습니다. 커맨드 라인을 사용하려면**
3. 여기에서 pantherlog CLI 도구 사용에 대한 지침을 따르세요 **새로 만들기**.
4. 시작하려면 다음 단계를 따르세요: **왼쪽 탐색 메뉴에서 클릭하세요**, **설명**및 **구성 > 스키마(Configure > Schemas).**.
   * 페이지 오른쪽 상단의 검색창 옆에서 클릭하세요
5. 를 입력하세요 **스키마 ID** 참고 URL `켜기`설명(Description)은 테이블에 대한 내용을 위한 것이며, 참고 URL은 내부 리소스에 연결하는 데 사용할 수 있습니다. [스키마 ID](https://docs.panther.com/ko/data-onboarding/field-discovery).
6. 일반 구성 **필요한 경우** 필드 발견(Field Discovery) **를 토글하여 활성화하세요** 타일에서 **에 대해 자세히 알아보세요**.
7. 일반 구성 **스키마** 섹션, 의
   * **샘플 파일 업로드**샘플 이벤트에서 스키마 추론 **시작** 샘플 로그에서 스키마 추론
     * 모달에서 라디오 버튼 중 하나를 클릭하세요: [: 샘플 로그 집합 업로드: 시스템에서 파일을 팝업 모달로 드래그하거나 클릭하세요](https://docs.panther.com/ko/ai) 파일 선택
   * **하고 로그 파일을 선택하세요.**&#x50;anther는 스키마 추론을 위해 헤더 없는 CSV를 지원하지 않습니다. 단,\
     ![In the Panther Console, there is a screen labeled "Infer Schema from Sample Logs." At the bottom of the screen shot, there is a section to Drag and drop a file or select a file to upload.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-5439a40bba6c016b9c3f8609ee26b12fb737462a%2Fimage.png?alt=media)
8. Panther AI
9. 가 활성화된 경우 예외입니다. **샘플 이벤트 붙여넣기** ([: 편집기에 샘플 이벤트를 직접 붙여넣거나 입력하세요.](https://docs.panther.com/ko/data-onboarding/reference#stream-type)).
   * **파일을 업로드한 후 Panther는 UI에 원시 로그를 표시합니다. 전체 원시 로그를 보려면 로그 라인을 확장할 수 있습니다. 다른 샘플 집합을 추가하면 이전에 업로드한 샘플이 덮어써진다는 점에 유의하세요.** 적절한
   * **스트림 유형(Stream Type)을 선택하세요** 각 유형의 예시는 여기에서 확인하세요
   * **자동(Auto):** Panther가 적절한 스트림 유형을 자동으로 감지합니다.
   * **라인(Lines):** 이벤트는 새 줄 문자로 구분됩니다.
   * **JSON:** 이벤트가 JSON 형식입니다.
   * **JSON 배열(JSON Array):** 이벤트가 JSON 객체의 배열 안에 있습니다. [CloudWatch Logs:](https://docs.panther.com/ko/data-onboarding/reference#xml-stream-type).
10. 이벤트가 CloudWatch Logs에서 왔습니다. **XML:**&#xC774;벤트가 [XML 형식](https://docs.panther.com/ko/ai#enabling-panther-ai)인 경우 JSON 로그를 업로드했다면 클릭하세요 **스키마 추론(Infer Schema)**&#xC744;(를). (비-JSON 로그를 업로드했고 **Panther AI가 활성화된 경우**).
    * 클릭하세요
    * Panther AI로 스키마 추론
    * 그런 다음\
      ![](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-8a129f8bded6ee5faadbf83de819547070f6e916%2Fimage.png?alt=media)
11. 확인(Confirm) **테스트 실행**.
    * Panther가 원시 샘플 로그에서 스키마 추론을 시작합니다.
    * Panther는 여러 타임스탬프 형식을 추론하려고 시도합니다. **스키마가 생성되면 스키마 편집기 상자에 표시됩니다.**.\
      ![On the left is a "Test" button. To its right is the text "Schema test against 1 total raw events completed," then a "View Events" button.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-781851d4a70ae67e3461ae0bf07564199da91628%2Fimage.png?alt=media)
      * 업로드한 샘플 로그와 스키마에 대해 행한 변경사항에 대해 스키마가 제대로 작동하는지 확인하려면 클릭하세요 **이 테스트는 스키마의 구문이 올바른지와 Panther에 업로드한 로그 샘플들이 스키마와 성공적으로 매칭되는지를 검증합니다.**&#xD14C;스트 결과를 보려면 클릭하세요
      * 이벤트 보기(View Events) **성공적으로 매칭된 모든 로그는**매칭됨(Matched)
12. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **"Resource": "\<secret ARN>"** 아래에 표시됩니다; 각 로그는 컬럼, 필드 및 JSON 뷰를 표시합니다.

{% hint style="info" %}
성공적으로 매칭되지 않은 모든 로그는
{% endhint %}
{% endtab %}

{% tab title="매칭되지 않음(Unmatched)" %}
**Panther에서 수신된 S3 데이터에서 맞춤 스키마 추론**

아래에 표시됩니다; 각 로그는 오류 메시지와 원시 로그를 표시합니다. [스키마를 게시하려면](#view-raw-s3-data) 를 클릭하세요. [Panther는 업로드된 모든 로그에서 추론하지만 스키마 생성 시 응답 속도를 보장하기 위해 최대 100개의 로그만 표시합니다.](#infer-a-schema-from-raw-data)을(를). (비-JSON 로그를 업로드했고 [Panther에서 수신된 S3 데이터](#test-the-schema-with-raw-data).

**S3 버킷에서 Panther로 실시간 스트리밍되는 데이터에서 맞춤 로그 소스에 대한 스키마를 생성하고 게시할 수 있습니다. 먼저**

Panther에서 S3 데이터를 확인

1. 한 다음 [스키마를 추론](https://docs.panther.com/ko/data-onboarding/data-transports/aws/s3) 스키마를 테스트
2. 원시 S3 데이터 보기 **개요** S3 버킷을 Panther에 온보드한 후 Panther로 들어오는 원시 데이터를 보고 그로부터 스키마를 추론할 수 있습니다: **다음 지침을 따라** 섹션의 명령을 실행하세요.\
   ![The source overview page reads, "Attach a schema to start classifying data". Below, there are two options, each with their own Start button: "I want to add an existing schema" and "I want to generate a schema from raw events"](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-392612e4b519b4cd5e9cb7b4d283fa6793dc4a59%2FScreenshot%202023-04-11%20at%204.22.16%20PM.png?alt=media)
3. S3 버킷을 Panther에 온보드
   * **스키마 없이.** 로그 소스의 **에 대해 자세히 알아보세요** 탭을 보면서 페이지 아래로 스크롤하여
     * 스키마를 연결하여 데이터 분류 시작 **S3 접두사 및 스키마** 다음 옵션 중에서 선택하세요:\
       ![On the S3 Prefixes & Filters screen, there is an area where you can enter a S3 prefix. There are additional buttons to "Add Exclusion Filters" and "Add schemas"](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-87325fcca5a528077c45039b137e3324c115135f%2FScreenshot%202023-04-11%20at%204.31.21%20PM.png?alt=media)
   * **기존 스키마를 추가하고 싶습니다:** 이미 스키마를 생성했고 Panther가 읽을 S3 접두사를 알고 있다면 이 옵션을 선택하세요. 타일에서 **에 대해 자세히 알아보세요** 탭을 보면서 페이지 아래로 스크롤하여
     * 을 클릭하세요.
     * 다음과 같은 팝업 모달이 표시됩니다:\
       ![The schema inference page is shown, with a Raw Events tile containing a number of raw JSON events in a table. In the leftmost column, each row has a "View JSON" button. The second column contains the raw events.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-07c25c75e0ad09f81c1f3a571e0bb146f628b90a%2FScreenshot%202023-04-11%20at%204.36.34%20PM.png?alt=media)
       * 원시 이벤트에서 스키마를 생성하고 싶습니다: `이 옵션을 선택하면 이 버킷의 실시간 데이터에서 스키마를 생성하고 Panther가 읽을 접두사를 정의할 수 있습니다. 클릭하세요`데이터가 Panther로 스트리밍되기 시작하려면 최대 15분까지 기다려야 할 수 있습니다.
       * 리디렉션된 페이지에서 화면 하단에서 Panther가 수신한 원시 데이터를 볼 수 있습니다: *이 데이터는 Panther 관리 S3 버킷인* data-archiver
       * 에서 표시되며, 모든 S3 로그 소스에 대해 원시 로그를 최대 15일간 보관합니다. **S3 버킷에 구성 후에** 소스를 Panther에서 구성한 이후에 버킷에 추가된 원시 로그 이벤트만 표시되며, 기간을 더 과거로 설정해도 보이지 않습니다.

**원시 이벤트가 JSON 형식이면 왼쪽 열에서**

JSON 보기(View JSON) **를 클릭하여 JSON으로 볼 수 있습니다.** 원시 데이터에서 스키마 추론

1. 이전 섹션에서 **원시 이벤트에서 스키마 생성하고 싶습니다** 를 선택한 경우 이제 스키마를 추론할 수 있습니다. **Raw Events에 데이터가 채워지는 것을 확인하면,** 섹션의 명령을 실행하세요.
2. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **XML:** 검색 문자열, S3 접두사, 제외된 접두사 및/또는 기간 필터를 사용하여 스키마를 추론할 이벤트를 필터링할 수 있습니다.\
   ![The image shows a section in the Panther Console labeled "Raw Events." On the right, there is a blue button labeled "Infer Schema." At the top of Raw Events, there is a Search bar, fields for S3 Prefix and Excluded Prefix, and a dropdown menu labeled Time Period.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-7217dbaba2918124af2c2b23ab096a0a8ba39846%2FScreenshot%202023-04-11%20at%204.43.25%20PM.png?alt=media)
3. 페이지에서 **원시 이벤트(Raw Events)** 에서 스키마를 생성하세요.
   * **새 스키마 추론** 팝업 모달에서 다음을 입력하세요:
     * 새 스키마 이름(New Schema Name): `사용자 정의.` 스키마가 퍼블리시되면 데이터 레이크의 테이블에 매핑될 스키마의 이름입니다.
   * **이름은 항상** 로 시작하며 그 다음에는 대문자가 있어야 합니다.
     * S3 접두사(S3 Prefix):
     * 추론 전에 설정된 기존 접두사나 새 접두사를 사용하세요. `*`.\
       ![The image shows a section in the Panther Console labeled "Infer New Schema." At the top, there is a header labeled "Fill in new Schema name" and a field labeled "New Schema Name." Below that, there is a header labeled "Select S3 prefix" and fields labeled "S3 Prefix". At the bottom, there is a blue button labeled "Infer Schema."](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-37b77c5544f5a6f245dcae9363372315178a475b%2FScreenshot%202023-04-12%20at%2011.09.44%20AM.png?alt=media)
4. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **XML:**.
   * 선택한 접두사는 S3 버킷의 해당 접두사에서 추론한 스키마로 데이터를 필터링합니다. **특정 접두사를 지정할 필요가 없다면 이 필드를 비워 두어 모두 포괄하는 기본 접두사**.
     * 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **를 사용할 수 있습니다.**.\
       ![The source page says the schema was successfully inferred. There is a Done button.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-30a5d70b08207463d0936a63364bbc3bf8f11d87%2FScreenshot%202023-04-12%20at%2011.12.08%20AM.png?alt=media)
   * 페이지 상단에서 다음이 표시됩니다 **'\<schema name>'이(가) 성공적으로 추론되었습니다** 완료(Done)
5. 스키마는 테스트 후 프로덕션에 게시할 준비가 될 때까지\
   ![In the Schemas section, the schema called Custom.CaraS3Countries is shown, with a "Draft" label. Below it is a section to Test Schemas, with a Run Test button.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-c9dcebbf9a1450510bd6247b99241b9e0b062b2d%2FScreenshot%202023-04-12%20at%2011.13.49%20AM.png?alt=media)
   * 초안(Draft) **'\<schema name>'이(가) 성공적으로 추론되었습니다**모드에 놓입니다.\
     ![The image shows an example schema from the Panther Console. There is a field labeled "SchemaID" and it contains the text "Custom.CaraS3Countries." The Reference URL field and Description field are not filled in. The schema is in a code block labeled "Event Schema." At the bottom, there is a blue button labeled "Validate Schema."](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-967f517e77d5a7a62c01beace809641c9ea5b2e1%2FScreenshot%202023-04-12%20at%2011.15.28%20AM.png?alt=media)

**스키마 이름을 클릭하여 스키마와 필드를 검토하세요.**

스키마가

1. 일반 구성 **모드에 있으므로 필요에 따라 필드를 변경, 제거 또는 추가할 수 있습니다.** 원시 데이터로 스키마 테스트 **테스트 실행**.\
   ![The image shows a section in the Panther Console labeled "Test Schemas." On the right, there is a blue button labeled "Run Test."](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-6431421b8c18dfbc99cc1eeaf5ea141be101af7b%2FScreenshot%202023-04-12%20at%2011.26.38%20AM.png?alt=media)
2. 페이지에서 **모드에 있으므로 필요에 따라 필드를 변경, 제거 또는 추가할 수 있습니다.** 스키마와 접두사가 정의되면 원시 데이터에 대해 스키마 구성을 테스트할 수 있습니다. **스키마 테스트(Test Schemas)** 화면 상단의 섹션에서 클릭하세요 **팝업 모달에서 테스트하려는**.\
   ![The image shows a section in the Panther Console labeled "Test Schemas." The center of the image contains the text "Test how your schemas perform during a selected time period." At the bottom, there is a drop-down menu labeled "Time Period" with the option "Last 14 days" selected. To the right of that, there is a blue button labeled "Start Test."](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-fe5af04449baefda4c7463104915cd5222dddc56%2FScreenshot%202023-04-12%20at%2011.30.19%20AM.png?alt=media)
   * 기간(Time Period)을 선택한 다음 클릭하세요\
     ![A section from the Panther Console labeled "Test finished - Elapsed Time 00min 00sec." The page shows Test Started Date, Events Date Start, Events Date End, Stream Type, Schemas Tested, Data Scanned, Matched Events, and Unmatched events.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-b4f2b9511260c8fb1fa374368906bc118ce188c5%2FScreenshot%202023-04-12%20at%2011.31.34%20AM.png?alt=media)
   * 테스트 시작(Start Test)
     * **시간 범위와 데이터 양에 따라 테스트 완료까지 몇 분 걸릴 수 있습니다.** 테스트가 시작되면 결과에 매칭된 이벤트 수와 매칭되지 않은 이벤트 수가 표시됩니다.
     * **매칭된 이벤트(Matched Events)** 는 스키마 구성과 성공적으로 분류되는 이벤트 수를 나타냅니다.
3. 매칭되지 않은 이벤트(Unmatched Events) **매칭된 이벤트(Matched Events)**&#xB294; 스키마와 분류되지 않는 이벤트 수를 나타냅니다.\
   ![The "Test Finished" screen in the Panther Console shows a list of specific errors and raw data.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-2cbd9777aa1f6fba431642667fe5f0f35de541e5%2Ftest-unmatched-events.png?alt=media)
   * 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **만약**가 있다면 오류와 JSON을 검사하여 실패 원인을 파악하세요.
4. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **만약**.
5. 오른쪽 상단에서 클릭하세요 **"Resource": "\<secret ARN>"**.\
   ![On the source page, the schema name is shown. In the upper right corner is a Save button, which is circled.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-85a5ca5827ba1aab7545574d26759eabb352ac85%2FScreenshot%202023-04-12%20at%2011.40.58%20AM.png?alt=media)
   * 스키마로 돌아가(Back to Schemas)
     {% endtab %}

{% tab title="필요한 변경을 하고 스키마를 다시 테스트하세요." %}
**이력 S3 데이터에서 맞춤 스키마 추론**

추론된 스키마가 이제 로그 소스에 연결되었습니다. *이력 S3 데이터* S3 버킷의 이력 데이터(즉 Panther에 로그 소스로 온보드되기

**전**

* 한 다음 [스키마를 추론](https://docs.panther.com/ko/data-onboarding/data-transports/aws/s3) 스키마를 테스트
  * 에 버킷에 추가된 데이터)에서 맞춤 S3 로그 소스에 대해 하나 또는 여러 개의 스키마를 추론하고 저장할 수 있습니다. [전제 조건: S3 버킷을 Panther에 온보드하세요](https://docs.panther.com/ko/data-transports/aws/s3#i-want-to-set-everything-up-on-my-own)사용자 지정 IAM 역할로 S3 소스를 온보드한 경우 `그 역할에는` ListBucket

**권한이 있어야 합니다.**

1단계: Panther에서 S3 버킷 구조 보기

1. Panther 콘솔의 왼쪽 탐색 창에서 **설정 > 로그 소스**.&#x20;
2. Panther에 S3 버킷 소스를 생성한 후 Panther 콘솔에서 S3 버킷의 구조와 데이터를 볼 수 있습니다:
3. S3 로그 소스로 들어가세요. **개요** S3 버킷을 Panther에 온보드한 후 Panther로 들어오는 원시 데이터를 보고 그로부터 스키마를 추론할 수 있습니다: **로그 소스의** 섹션의 명령을 실행하세요.
4. 스키마를 연결하여 데이터 분류 시작 **오른쪽에** 타일에서 **에 대해 자세히 알아보세요**.

   ![버킷 데이터에서 스키마 생성하고 싶습니다(I want to generate a schema from bucket data)](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-ae3b7d90f3b9f88223f53d655fb1753b802e06b9%2FScreenshot%202023-04-25%20at%201.12.51%20PM.png?alt=media)

   * Panther의 로그 소스 개요(Overview) 탭에는 "버킷 데이터에서 스키마 생성"이라는 타일 옆에 "시작(Start)" 버튼이 있습니다.

     <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-f11cbe163d4e94ad40b640ab84d86ee108a8c7ea%2FScreenshot%202023-04-27%20at%2010.27.46%20AM.png?alt=media" alt="The folder inspection view in the Panther Console" width="563"><figcaption></figcaption></figure>
   * 폴더 검사(folder inspection)로 리디렉션됩니다. 여기에서 S3 버킷의 모든 폴더와 객체를 보고 탐색할 수 있습니다. [또는 S3 소스를 Panther에 온보드한 후 성공 페이지에서 S3 버킷의 폴더 검사를 액세스할 수 있습니다.](https://docs.panther.com/ko/data-onboarding/data-transports/aws/s3) 해당 페이지에서 클릭하세요 **아직 하지 않았다면, 클릭하세요**.\
     ![On the success screen after onboarding an S3 source in Panther, there is a button labeled "Attach or infer schemas."](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-a78db2d97d5896ed1886070dbfd7fae44888505c%2FScreenshot%202023-04-25%20at%201.02.13%20PM.png?alt=media)

**2단계: 데이터 탐색**

* 폴더 검사를 보는 동안 객체를 클릭하세요.
  * 슬라이드아웃 패널이 나타나며 해당 이벤트의 미리보기를 표시합니다:

<figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-cca8b95257b473222b3bcb9736f6177a62d75039%2FScreenshot%202023-04-25%20at%201.24.49%20PM.png?alt=media" alt="In Panther, an S3 object is highlighted. A pop-over window is displaying a preview of its events." width="563"><figcaption></figcaption></figure>

이벤트가 제대로 렌더링되지 않거나(오류가 발생하거나 이벤트가 잘못 표시되는 경우) S3 버킷 소스에 대해 잘못된 스트림 유형이 선택되었을 수 있습니다. 이 경우 클릭하세요 **선택된 로그 형식은 n입니다(Selected Logs Format is n)**:

<figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-e8cf170f6fa706886ec7b548deb623a3db8fbe7e%2FScreenshot%202023-04-25%20at%201.28.29%20PM.png?alt=media" alt="On the source&#x27;s folder selection view in the Panther Console, the option to select a stream type appears at the top." width="563"><figcaption></figcaption></figure>

**3단계: 각 폴더에 기존 스키마가 있는지 새로 추론해야 하는지 표시**

버킷에 포함된 내용을 검토한 후 버킷의 모든 데이터를 표현하는 데 하나 이상의 스키마가 필요한지 결정할 수 있습니다. 다음으로 서로 다른 구조의 데이터를 포함하는 폴더를 선택하고 새 스키마를 추론하거나 기존 스키마를 할당할 수 있습니다.

1. S3 버킷의 데이터에서 하나 이상의 스키마를 추론해야 하는지 결정하세요.
   * 버킷의 모든 데이터가 동일한 구조(따라서 하나의 스키마로 표현 가능)라면 버킷 수준에서 기본 **원시 이벤트(Raw Events)** 옵션을 선택 상태로 둘 수 있습니다. 이렇게 하면 버킷의 모든 데이터에 대해 단일 스키마가 생성됩니다.

     <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-f4d1f1d01d152a31e818a9f5131beb6540f05c6e%2Fimage.png?alt=media" alt="The &#x22;Infer 1 schema&#x22; button is in the upper right corner of the S3 folders page in the Panther Console." width="563"><figcaption></figcaption></figure>
   * S3 버킷에 여러 스키마로 분류해야 하는 데이터가 포함된 경우, 버킷의 각 폴더에 대해 아래 단계를 따르세요:
     1. 폴더를 선택하고 클릭하세요 **포함(Include)**.
        * 또는 처리하지 않기를 원하는 폴더나 하위 폴더가 있는 경우 선택하고 클릭하세요 *Enterprise 조직* 제외(Exclude) **데이터에 일치하는 기존 스키마가 있다면 행 오른쪽의 드롭다운을 클릭한 다음 스키마를 선택하세요:**.\
          ![](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-5fcd73cc431f1180f7131be791d1234d20239cb9%2Fimage.png?alt=media)
     2. 기본적으로 새로 포함된 각 폴더에는 **필요한 경우** 옵션이 선택되어 있습니다.\
        ![The schema dropdown is expanded next to the data object.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-bf9969f0ca6889b3796c8d8baf251de1f3e01f6b%2FScreenshot%202023-04-25%20at%201.43.17%20PM.png?alt=media)
        * 추론(Infer) **원시 이벤트(Raw Events)** n
2. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **4단계: 스키마가 추론될 때까지 기다리기 `스키마 추론 프로세스는 최대 15분이 걸릴 수 있습니다. 프로세스가 완료되는 동안 이 페이지를 떠나도 됩니다. 또한 이 프로세스를 조기에 중지하고 프로세스가 실행되는 동안 추론된 스키마를 유지할 수도 있습니다.` 스키마**.\
   ![](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-22b782c3292729767228d552f4b53c553e887967%2Fimage.png?alt=media)

**5단계: 결과 검토**

추론 프로세스가 완료되면 생성된 스키마와 각 스키마 추론 중 사용된 이벤트 수를 볼 수 있습니다. 또한 각 스키마가 원시 이벤트를 어떻게 파싱하는지 검증할 수 있습니다.

<figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-4f9d0bed4bd9c9382dfc4772338eced52da35809%2FScreenshot%202023-04-25%20at%201.56.13%20PM.png?alt=media" alt="The source page in Panther shows the schema inference details, including an infer skipped and the number of events processed." width="563"><figcaption></figcaption></figure>

**각 행 오른쪽의 재생 아이콘을 클릭하세요.**

이벤트(Events)

1. 탭에서 원시 및 정규화된 이벤트를 확인하세요.

   <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-8bcebaa11bebe2dada6069edca169c917717795b%2Fimage%20(6)%20(2).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>
2. 을 클릭하세요 **탭에서 생성된 스키마를 확인하세요.** 6단계: 스키마 이름 지정 및 소스 저장

   <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-9cacdcf6f276e3f28d6c7e6f8f1ae63fe6cc1a21%2Fimage.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>
3. 을 클릭하세요 **필요한 경우** 소스를 저장하기 전에 새로 추론된 각 스키마에 고유한 이름을 지정하려면

   <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-11c8b6339596224c890503371d9b026ad898f812%2Fimage.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**이름 추가(Add name)**

를 클릭하세요. **모든 새 스키마에 이름을 지정한 후 오른쪽 상단의**.

<div align="center"><figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-47a2c5613a288cd17c68fd2837686146c12b3365%2FScreenshot%202023-04-25%20at%202.21.16%20PM.png?alt=media" alt="" width="563"><figcaption></figcaption></figure></div>

을 클릭할 수 있습니다. **소스 저장** Panther에서 수신된 HTTP 데이터
{% endtab %}

{% tab title="HTTP(웹후크) 소스에서 Panther로 실시간 스트리밍되는 데이터에서 맞춤 로그 소스에 대한 스키마를 생성하고 게시할 수 있습니다. 먼저" %}
**Panther에서 수신된 HTTP 데이터에서 맞춤 스키마 추론**

HTTP 데이터를 확인 [원시 HTTP 데이터 보기](#view-raw-http-data) 를 클릭하세요. [Panther는 업로드된 모든 로그에서 추론하지만 스키마 생성 시 응답 속도를 보장하기 위해 최대 100개의 로그만 표시합니다.](#infer-a-schema-from-raw-data-1)을(를). (비-JSON 로그를 업로드했고 [Panther에서 수신된 S3 데이터](#test-the-schema-with-raw-data-1).

**Panther에**

HTTP 소스를 생성한 후 Panther로 들어오는 원시 데이터를 보고 그로부터 스키마를 추론할 수 있습니다: [HTTP 로그 소스 설정 지침](https://docs.panther.com/ko/data-onboarding/data-transports/http) Panther에서.

1. 다음을 따르세요 [HTTP 소스 설정 중에 스키마를 선택하지 마세요.](https://docs.panther.com/ko/data-transports/http#how-to-set-up-an-http-log-source-in-panther) 이미 스키마를 생성한 경우 이 옵션을 선택하세요. 클릭하세요
   * HTTP 소스 편집 페이지로 이동되며, 여기서
2. 원시 S3 데이터 보기 **개요** S3 버킷을 Panther에 온보드한 후 Panther로 들어오는 원시 데이터를 보고 그로부터 스키마를 추론할 수 있습니다: **다음 지침을 따라** 섹션의 명령을 실행하세요.\
   ![The Overview tab of the detail page of an HTTP source called "HTTP Holding Tank" is shown. There is a Basic Info section with fields like Source ID, HTTP Ingest URL, etc. Below, there is a section titled "Attach a schema to start classifying data." Within it are two options: I want to add an existing schema, and I want to generate a schema.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-5447fb77d4aef7179e1a1675143cc358298d7183%2Fhttpholdingtank.webp?alt=media)
3. S3 버킷을 Panther에 온보드
   * **스키마 없이.** 스키마 - 선택 사항(Schemas - Optional) **에 대해 자세히 알아보세요** 탭을 보면서 페이지 아래로 스크롤하여
     * 필드에서 선택을 할 수 있습니다: **HTTP 소스 편집 페이지** 스키마를 생성하고 싶습니다(I want to generate a schema):

       <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-c03face0c363c3dba14fc47ff02f399aed9855e4%2FScreenshot%202023-09-12%20at%201.41.54%20PM.png?alt=media" alt="The edit page for an HTTP source is shown. In the Basic Information section, the &#x22;Schemas - Optional&#x22; dropdown field is open, but no selections have been made." width="375"><figcaption><p>실시간 데이터에서 스키마를 생성하려면 이 옵션을 선택하세요. 클릭하세요</p></figcaption></figure>
   * **이벤트를 HTTP 엔드포인트로 POST한 후 Panther에 표시되려면 몇 분 정도 기다려야 할 수 있습니다.** 리디렉션된 페이지에서 **에 대해 자세히 알아보세요** 탭을 보면서 페이지 아래로 스크롤하여
     * 지난 일주일 내에 Panther가 수신한 원시 데이터를 볼 수 있습니다: `HTTP 원시 이벤트(HTTP Raw events)`Panther가 관리하는 S3 버킷으로 HTTP 소스 원시 로그를 15일간 보관합니다.
     * 를 선택하면 **Raw Events에 데이터가 채워지는 것을 확인하면,**&#xC2A4;키마 생성 원함(I want to generate a schema)

       <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-42ea113882672838c9cdb5ab36ef9d1197d248b6%2FScreenshot%202023-09-12%20at%201.44.03%20PM.png?alt=media" alt="An HTTP source schema attachment page is shown. There is an arrow pointing to the section at the bottom, called &#x22;Raw Events.&#x22; Various JSON events are included in this section. There is a blue &#x22;Infer Schema&#x22; button."><figcaption><p>Raw Events에 데이터가 채워지는 것을 확인한 후</p></figcaption></figure>
     * 원시 이벤트에서 스키마를 생성하고 싶습니다: `이 옵션을 선택하면 이 버킷의 실시간 데이터에서 스키마를 생성하고 Panther가 읽을 접두사를 정의할 수 있습니다. 클릭하세요`팝업 모달에서 다음을 입력하세요:

**원시 이벤트가 JSON 형식이면 왼쪽 열에서**

설명적인 이름을 입력하세요. 이름은 항상 **로 시작합니다.** 원시 데이터에서 스키마 추론

1. 스키마는 테스트 후 게시할 준비가 될 때까지 **Raw Events에 데이터가 채워지는 것을 확인하면,**&#xC778; 경우 JSON 로그를 업로드했다면 클릭하세요 **XML:**.\
   ![An HTTP source schema attachment page is shown. There is a section at the bottom called "Raw Events." Various JSON events are included in this section. There is an arrow pointing to a blue "Infer Schema" button.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-5b3001286d7577292a5d00fe809732320700bc6d%2FScreenshot%202023-09-12%20at%201.47.58%20PM.png?alt=media)
2. 페이지에서 **원시 이벤트(Raw Events)** 모드에 놓입니다.
   * **새 스키마 추론** 임시 스키마의 이름을 클릭하여 추론된 필드를 검토하세요. `사용자 정의.` 스키마가 퍼블리시되면 데이터 레이크의 테이블에 매핑될 스키마의 이름입니다.
3. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **XML:**.
   * 선택한 접두사는 S3 버킷의 해당 접두사에서 추론한 스키마로 데이터를 필터링합니다. **특정 접두사를 지정할 필요가 없다면 이 필드를 비워 두어 모두 포괄하는 기본 접두사**.
4. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **를 사용할 수 있습니다.**.\
   ![Text reads "'Custom.HttpHoldingTank' was successfully inferred." Below, there is a Done button, which is circled.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-e0b07b0af68547d35e93520b39f4efe7dac434e9%2FScreenshot%202023-09-12%20at%201.50.20%20PM.png?alt=media)
   * 필요에 따라 필드 추가, 제거 및 변경을 할 수 있습니다. **'\<schema name>'이(가) 성공적으로 추론되었습니다** 스키마가 정의되면 원시 데이터에 대해 스키마 구성을 테스트할 수 있습니다.
5. 팝업 모달에서\
   ![Under a "Schema(s)" header is "Custom.HttpHoldingTank" with a "Draft" label. It is circled.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-d523d0791496dfcf737d38864fa64de93f32dfe5%2FScreenshot%202023-09-12%20at%201.51.34%20PM.png?alt=media)
   * 초안(Draft) **'\<schema name>'이(가) 성공적으로 추론되었습니다**HTTP 소스에 스키마가 연결되기 전에 해당 HTTP 소스로 전송된 로그 이벤트가 스키마 추론에 사용되었으며, 이후 Panther로 수집됩니다.\
     ![The edit schema view is shown. There are fields for Schema ID, Reference URL, and Description. Below, is the schema itself, in a code editor.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-759f088c08a2afa41e6c83aca4c75e20bec41400%2FScreenshot%202023-09-12%20at%201.52.34%20PM.png?alt=media)

**스키마 이름을 클릭하여 스키마와 필드를 검토하세요.**

맞춤 스키마를 수동으로 생성하는 방법

1. 일반 구성 **모드에 있으므로 필요에 따라 필드를 변경, 제거 또는 추가할 수 있습니다.** 원시 데이터로 스키마 테스트 **테스트 실행**.\
   ![Under a "Schema(s)" header is "Custom.HttpHoldingTank" with a "Draft" label. In the bottom right corner, under a "Test Schemas" header, is a "Run Test" button, which is circled.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-ad47964bee16d2ec2faa7f9c1d852574c243b3cc%2FScreenshot%202023-09-12%20at%201.53.28%20PM.png?alt=media)
2. 일반 구성 **모드에 있으므로 필요에 따라 필드를 변경, 제거 또는 추가할 수 있습니다.** 맞춤 스키마를 수동으로 생성하려면: **스키마 테스트(Test Schemas)** 화면 상단의 섹션에서 클릭하세요 **팝업 모달에서 테스트하려는**.\
   ![The "Test Schemas" modal has a "Time Period" dropdown selection and a "Start Test" button.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-29c59b9b6dfd08216c3300c9f767c1e7a5bf95c9%2FScreenshot%202023-09-12%20at%201.54.59%20PM.png?alt=media)
   * 기간(Time Period)을 선택한 다음 클릭하세요\
     ![The HTTP Source schema test page is shown. It shows "18 Matched Events" and "0 Unmatched Events." There is a blue "Back to Schemas" button.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-8ad44d2c53183b3b50a69918ed42d5e5330f7b9d%2FScreenshot%202023-09-12%20at%201.55.32%20PM.png?alt=media)
   * 테스트 시작(Start Test)
     * **시간 범위와 데이터 양에 따라 테스트 완료까지 몇 분 걸릴 수 있습니다.** 테스트가 시작되면 결과에 매칭된 이벤트 수와 매칭되지 않은 이벤트 수가 표시됩니다.
     * **매칭된 이벤트(Matched Events)** 는 스키마 구성과 성공적으로 분류되는 이벤트 수를 나타냅니다.
3. 매칭되지 않은 이벤트(Unmatched Events) **매칭된 이벤트(Matched Events)**&#xB294; 스키마와 분류되지 않는 이벤트 수를 나타냅니다.\
   ![A list of JSON logs is shown under an "Unmatched Events" header. There are two columns, "Raw Events" and "Error"](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-362e0d802c608e8e667edc4f30dd8a98f0b72ccc%2FScreenshot%202023-09-12%20at%201.57.17%20PM.png?alt=media)
   * 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **만약**가 있다면 오류와 JSON을 검사하여 실패 원인을 파악하세요.
4. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **만약**.
5. 오른쪽 상단에서 클릭하세요 **"Resource": "\<secret ARN>"**.\
   ![The HTTP Source schema edit page is shown, and its "Save" button in the upper-right corner is circled.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-6c31023c148ef1caf981b7f62aa6dda76dbc4644%2FScreenshot%202023-09-12%20at%201.58.03%20PM.png?alt=media)
   * 스키마로 돌아가(Back to Schemas)
   * 자동 필드 발견(Automatic Field Discovery)
     {% endtab %}
     {% endtabs %}

## 스키마 직접 생성

### 스키마를 처음부터 생성

섹션은 기본적으로

1. Panther 콘솔의 왼쪽 탐색 창에서 **구성** > **스키마**.
2. 오른쪽 상단에서 클릭하세요 **새로 만들기**.
3. 시작하려면 다음 단계를 따르세요: **왼쪽 탐색 메뉴에서 클릭하세요**, **설명**및 **구성 > 스키마(Configure > Schemas).**.
   * 페이지 오른쪽 상단의 검색창 옆에서 클릭하세요
4. 를 입력하세요 **별도 섹션(Separate Sections)** 참고 URL `켜기`설명(Description)은 테이블에 대한 내용을 위한 것이며, 참고 URL은 내부 리소스에 연결하는 데 사용할 수 있습니다. [스키마 ID](https://docs.panther.com/ko/data-onboarding/field-discovery).
5. 일반 구성 **필요한 경우** 필드 발견(Field Discovery) **을 사용하도록 설정됩니다. 전체 스키마를 하나의 편집기 창에서 작성하려면** 타일에서 **에 대해 자세히 알아보세요**.
   * 사용자를 사용할 것이며, **필요한 경우** 단일 편집기(Single Editor) **파서(Parser)**&#xC139;션에서 스키마가 기본(JSON/XML) **파서 이외의 파서를 필요로 하는 경우 해당 파서를 선택하세요. 다른 파서 옵션에 대해서는 다음 페이지에서 자세히 알아보세요:**.\
     ![To the right of a "Schema" header is a toggle with two values: Separate Sections and Single Editor.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-698807c490df7c03ac197a5a6504b98d7a64e554%2FScreenshot%202024-06-12%20at%209.48.23%20AM.png?alt=media)
6. 일반 구성 **스크립트 로그 파서(Script Log Parser)** Fastmatch 로그 파서(Fastmatch Log Parser) **정규식(Regex) 로그 파서(Regex Log Parser)** CSV 로그 파서(CSV Log Parser)
   * [필드 및 지표(Fields & Indicators)](https://docs.panther.com/ko/data-onboarding/custom-log-types/script-parser)
   * [섹션에서 YAML 로그 스키마 필드를 작성하거나 붙여넣으세요.](https://docs.panther.com/ko/data-onboarding/custom-log-types/fastmatch-parser)
   * [스키마 작성에 대해 더 알아보려면](https://docs.panther.com/ko/data-onboarding/custom-log-types/regex-parser)
   * [을(를) 참조하세요.](https://docs.panther.com/ko/data-onboarding/custom-log-types/csv-parser)
7. 일반 구성 **Panther가 생성한** 스키마 필드 제안
   * 참조 [(선택 사항)](#writing-schemas) 범용 데이터 모델(Universal Data Model)
   * 섹션에서 스키마에 대한 핵심 필드(Core Field) 매핑을 정의하세요. [에 대해 자세히 알아보려면](#schema-field-suggestions).
8. 맞춤 로그 스키마에서 핵심 필드 매핑(Mapping Core Fields in Custom Log Schemas) **창 하단에서 클릭하여 스키마에 오류가 없는지 검증하세요** 구문 검증은 로그 스키마의 구문만 검사합니다. 이름 충돌로 인해 저장에 실패할 수 있습니다.
   * 이제 [로 이동하여 새 소스를 추가하거나 기존 소스를 수정하여 새](https://docs.panther.com/ko/search/panther-fields#mapping-core-fields-in-custom-log-schemas).
9. 사용하도록 설정할 수 있습니다. **테스트 실행** Custom.SampleAPI
   * \_로그 유형. Panther가 이 소스에서 이벤트를 수신하면 로그를 처리하여
10. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **"Resource": "\<secret ARN>"**.

custom\_sampleapi **설정 > 로그 소스** 테이블에 저장합니다. `이제 또한` 디텍션 `을(를) 작성하여 이러한 로그와 매칭시키고` 을(를) 사용하여 쿼리할 수 있습니다.

JSON, XML 및 텍스트 로그에 대한 스키마 작성 방법은 아래 탭을 참조하세요. [JSON 로그](https://docs.panther.com/ko/detections) JSON 로그에 대한 스키마 작성 [로그 소스가 구성된 후에는 수집된 데이터를 사용하여 검색할 수 있습니다](https://docs.panther.com/ko/search/search-tool) 이전에 생성한 Snowflake 사용자 이름, 예를 들면 [panther\_monitor](https://docs.panther.com/ko/search/data-explorer).

### (선택 사항)

각 라인이 JSON인 로그 파일을 파싱하려면 각 로그 항목의 구조를 설명하는 로그 스키마를 정의해야 합니다.

{% tabs %}
{% tab title="Panther 콘솔에서 YAML 명세를 직접 편집할 수 있으며, 또는 원하는 편집기/IDE에서 오프라인으로" %}
**준비할 수 있습니다.**

로그 스키마의 구조와 필드에 대한 자세한 정보는

로그 스키마 참조(Log Schema Reference) [를 참조하세요.](https://docs.panther.com/ko/data-onboarding/reference#using-json-schema-in-an-ide)또한 JSON 로그에서 *starlark*파서를 사용하여 Panther가 기본적으로 지원하는 것 이외의 변환을 수행할 수 있습니다. [아래 예제 스키마에서 첫 번째 탭은 JSON 로그 구조를 표시하고 두 번째 탭은 로그 스키마를 보여줍니다.](https://docs.panther.com/ko/data-onboarding/custom-log-types/reference).

JSON 로그 예시 [`"method": "GET",` "path": "/-/metrics",](https://docs.panther.com/ko/data-onboarding/custom-log-types/script-parser) "format": "html", ["controller": "MetricsController",](https://docs.panther.com/ko/data-onboarding/custom-log-types/transformations).

"action": "index",

{% tabs %}
{% tab title=""status": 200," %}

```json
{
  "params": [],
  "remote_ip": "1.1.1.1",
  "user_id": null,
  "username": null,
  "ua": null,
  "queue_duration_s": null,
  "correlation_id": "c01ce2c1-d9e3-4e69-bfa3-b27e50af0268",
  "cpu_s": 0.05,
  "db_duration_s": 0,
  "view_duration_s": 0.00039,
  "duration_s": 0.0459,
  "correlation_id": "c01ce2c1-d9e3-4e69-bfa3-b27e50af0268",
  "cpu_s": 0.05,
  "db_duration_s": 0,
  "view_duration_s": 0.00039,
  "duration_s": 0.0459,
  "duration_s": 0.0459,
  "tag": "test",
  "time": "2019-11-14T13:12:46.156Z"
}
```

**압축된 JSON 로그 예시**:

{% hint style="info" %}
이를 활용하십시오 **압축된 JSON 로그 예시** 사용할 때 `pantherlog` 도구 또는 Panther 콘솔 내에서 스키마를 생성할 때.
{% endhint %}

`{"method":"GET","path":"/-/metrics","format":"html","controller":"MetricsController","action":"index","status":200,"params":[],"remote_ip":"1.1.1.1","user_id":null,"username":null,"ua":null,"queue_duration_s":null,"correlation_id":"c01ce2c1-d9e3-4e69-bfa3-b27e50af0268","cpu_s":0.05,"db_duration_s":0,"view_duration_s":0.00039,"duration_s":0.0459,"tag":"test","time":"2019-11-14T13:12:46.156Z"}`
{% endtab %}

{% tab title="로그 스키마 예시" %}

```yaml
필드:
- 이름: time
  description: 이벤트 타임스탬프
  required: true
  type: timestamp
  timeFormats: 
   - rfc3339
  isEventTime: true
- name: method
  설명: 요청에 사용된 HTTP 메서드
  type: string
- name: path
  설명: 요청에 사용된 경로
  type: string
- 이름: remote_ip
  설명: 요청이 발생한 원격 IP 주소
  type: string
  지표: [ ip ] # 값이 유효한 IP 주소인 경우 `p_any_ip_addresses`에 추가됩니다
- 이름: duration_s
  설명: 요청이 완료되는 데 걸린 초 수
  type: float
- 이름: format
  설명: 응답 형식
  type: string
- 이름: user_id
  설명: 요청을 수행한 사용자의 ID
  type: string
- 이름: params
  type: array
  element:
    type: object
    필드:
    - 이름: key
      설명: 쿼리 파라미터의 이름
      type: string
    - 이름: value
      설명: 쿼리 파라미터의 값
      type: string
- 이름: tag
  설명: 요청에 대한 태그
  type: string
- 이름: ua
  설명: UserAgent 헤더
  유형: strinll
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="XML 로그" %}
**XML 로그용 스키마 작성하기**

Panther는 XML 로그를 중간에 JSON으로 파싱하므로 JSON 로그 탭에 설명된 JSON 로그용 모든 도구를 사용할 수 있습니다. Panther가 XML을 JSON으로 파싱하는 방법은 [XML 스트림 유형](https://docs.panther.com/ko/data-onboarding/reference#xml-stream-type), 그런 다음 해당에 맞게 스키마를 생성하십시오.

XML은 문자열 외의 데이터 유형을 지원하지 않으므로 해당 JSON 표현의 모든 값은 문자열로 표시됩니다(예: `"ip": "192.168.1.100"` ). 스키마를 정의할 때 아래의 로그 스키마 예시에서 볼 수 있듯이 각 필드에 적절한 유형을 사용할 수 있습니다.

{% tabs %}
{% tab title="XML 로그 예시" %}
원시 XML 로그:

```xml
<log>
    <id>12345</id>
    <timestamp>2023-11-14T13:12:46.156Z</timestamp>
    <event type="security" priority="high">
        <message>권한 없는 접근 시도 감지</message>
        <source>
            <ip>192.168.1.100</ip>
            <user>admin</user>
        </source>
        <details>
            <action>login_failed</action>
            <reason>invalid_credentials</reason>
        </details>
    </event>
</log>
```

{% endtab %}

{% tab title="동등한 JSON 예시" %}
원시 XML 로그가 [JSON으로 변환된 방법](https://docs.panther.com/ko/data-onboarding/reference#xml-stream-type):

```json
{
  "id": "12345",
  "timestamp": "2023-11-14T13:12:46.156Z",
  "event": {
    "type": "security",
    "priority": "high",
    "message": "권한 없는 접근 시도 감지",
    "source": {
      "ip": "192.168.1.100",
      "user": "admin"
    },
    "details": {
      "action": "login_failed",
      "reason": "invalid_credentials"
    }
  }
}
```

{% endtab %}

{% tab title="로그 스키마 예시" %}
이 로그를 파싱하기 위한 로그 스키마는 다음과 같이 보입니다:

```yaml
필드:
- 이름: id
  설명: 고유 로그 식별자
  type: string
  required: true
- 이름: timestamp
  description: 이벤트 타임스탬프
  type: timestamp
  timeFormats: 
   - rfc3339
  isEventTime: true
- name: event
  설명: 이벤트 세부 정보
  type: object
  필드:
  - 이름: type
    description: 이벤트 유형
    type: string
  - 이름: priority
    설명: 이벤트 우선순위 수준
    type: string
  - name: message
    설명: 이벤트 메시지
    type: string
  - name: source
    설명: 출처 정보
    type: object
    필드:
    - 이름: ip
      description: 출발지 IP 주소
      type: string
      지표: [ ip ]
    - name: user
      설명: 사용자 이름
      type: string
  - 이름: details
    설명: 추가 이벤트 세부 정보
    type: object
    필드:
    - 이름: action
      설명: 수행된 작업
      type: string
    - 이름: reason
      설명: 작업의 이유(해당되는 경우)
      type: string
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="텍스트 로그" %}
**텍스트 로그용 스키마 작성하기**

Panther는 JSON/XML으로 구조화되지 않은 로그를 각 로그 라인을 키/값 쌍으로 변환하여 파이프라인의 나머지 부분에 JSON으로 전달하는 '파서'를 사용하여 처리합니다. 텍스트 파서를 정의하려면 `"path": "/-/metrics",` 의 필드를 사용하십시오 *starlark*Panther는 비 JSON/XML 형식 로그를 위해 다음 파서를 제공합니다:

<table data-header-hidden><thead><tr><th width="182.74652099609375">이름</th><th>설명</th></tr></thead><tbody><tr><td>이름</td><td>설명</td></tr><tr><td><a href="custom-log-types/fastmatch-parser">fastmatch</a></td><td>각 텍스트 라인을 하나 이상의 단순 패턴과 매칭합니다</td></tr><tr><td><a href="custom-log-types/regex-parser">regex</a></td><td>정규 표현식 패턴을 사용하여 조건부 필드, 대소문자 무시 매칭 등 더 복잡한 매칭을 처리합니다.</td></tr><tr><td><a href="custom-log-types/csv-parser">csv</a></td><td>로그 파일을 CSV로 처리하여 열 이름을 필드 이름에 매핑합니다</td></tr><tr><td><a href="custom-log-types/script-parser">"method": "GET",</a></td><td>텍스트 로그를 파싱하거나 json 로그에 대한 변환을 수행합니다</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

### 스키마 필드 제안

사용자 지정 스키마를 생성하거나 편집할 때 Panther가 생성한 필드 제안을 사용할 수 있습니다. 이 기능을 사용하려면:

1. Panther 콘솔에서 YAML 스키마 편집기로 들어갑니다.
   * 기존 스키마를 편집하려면 클릭하십시오 **구성** > **스키마** > \[편집하려는 스키마 이름] > **편집을 클릭**.
   * 새 스키마를 생성하려면 클릭하십시오 **구성** > **스키마** > **새로 만들기**.
2. 누르십시오 `Command+I` macOS에서 (또는 `Control+I` PC에서).
   * 스키마 편집기는 텍스트 커서의 위치에 따라 사용 가능한 속성 및 연산을 표시합니다.

     ![YAML 스키마 편집기가 표시됩니다. 커서 아래에는 concat, copy, description, indicators, mask 등 다양한 필드 제안이 있는 창이 있습니다.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-5994172165705efb58eb28e3847dbe5e083bc26d%2FScreenshot%202023-11-27%20at%202.42.15%20PM.png?alt=media)

## 사용자 지정 스키마 관리

### 사용자 지정 스키마 편집

Panther는 사용자 지정 스키마를 편집할 수 있도록 허용합니다. 구체적으로 다음 작업을 수행할 수 있습니다:

* 새 필드 추가.
* 기존 필드 이름 변경 또는 삭제.
* 기존 필드의 모든 속성 편집, 추가 또는 제거.
* 구성 `"path": "/-/metrics",` 버그를 수정하거나 새로운 패턴을 추가하기 위한 구성을 수정합니다.
* [스키마 보관 또는 보관 해제](#archiving-and-unarchiving-a-custom-schema).
* [필드 검색 활성화 또는 비활성화](https://docs.panther.com/ko/field-discovery#enabling-field-discovery-1).

{% hint style="info" %}
필드의 `유형`, 새로 수집된 데이터는 새 유형과 일치하고 이전에 수집된 데이터는 이전 유형을 유지합니다.
{% endhint %}

사용자 지정 스키마를 편집하려면:

1. Panther 콘솔에서 사용자 지정 스키마의 세부 정보 페이지로 이동하십시오.
2. 세부 정보 페이지 오른쪽 상단에서 클릭하십시오 **편집을 클릭**.

   <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-e8605e4dc7ea1aed0cdce32019d3b54a4ed1b86c%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
3. 원하는 대로 스키마를 수정하십시오.
   * 섹션에서 스키마에 대한 핵심 필드(Core Field) 매핑을 정의하세요. [에 대해 자세히 알아보려면](#schema-field-suggestions).
   * 변경 사항을 더 쉽게 확인(또는 삭제된 라인을 복사하거나 되돌리려면)하려면 클릭하십시오 **단일 편집기,** 그런 다음 **차이 보기**.

     <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-5799bf847f9a6051e07a5723c3eb5ed012e08805%2FdiffViewSchemaEditor.png?alt=media" alt="The Schema editor is shown, and the &#x22;Single Editor&#x22; and &#x22;Diff View&#x22; buttons are shown. One field has been changed, from event_time to new_name."><figcaption></figcaption></figure>
4. 오른쪽 상단에서 **업데이트**.

를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **테스트 실행** YAML의 구조적 준수를 확인하십시오. 규칙은 클릭한 후에만 확인된다는 점에 유의하십시오 **업데이트** . 규칙을 준수하지 않으면 업데이트가 거부됩니다.

#### 관련 디텍션 및 저장된 쿼리 업데이트

스키마 필드를 편집하면 관련 디텍션 및 저장된 쿼리를 업데이트해야 할 수 있습니다. 영향을 받는 디텍션 및 저장된 쿼리 목록을 보고, 업데이트하고, 테스트하려면 스키마 편집기 위에 표시되는 알러트 배너에서 **관련 디텍션** 을 클릭하십시오.

<figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-0811c7a3b35787d7b51247115a2e93de7f768b63%2Fcustom.schema.png?alt=media" alt="A schema&#x27;s name is shown, &#x22;Custom.A&#x22;—to its right are three buttons: Upload Sample Logs, Cancel, and Update."><figcaption></figcaption></figure>

#### **쿼리 영향**

쿼리는 **유형** 변경 간에도 작동합니다 단, 쿼리가 캐스트할 수 없는 필드 유형을 요구하는 함수나 연산자를 사용하지 않는 경우에 한합니다. **유형들**.

* **좋은 예**: 다음 **유형** 이(가) `문자열` 에서 `정수` 로 편집되어 모든 기존 값이 숫자인 경우(예: `"1"` ). 함수 `sum` 은 이전 값과 새 값을 함께 집계합니다.
* **나쁜 예**: 다음 **유형** 이(가) `문자열` 에서 `정수` 어떤 기존 값 중 일부가 숫자가 아닌 경우(예: `"apples"` ). 함수 `sum` 숫자가 아닌 값을 제외합니다.

#### 쿼리 캐스트 가능성 표

이 표는 어떤 **유형들** 를 쿼리 실행 시 각 **유형** 로 캐스트할 수 있는지를 보여줍니다. 스키마 편집은 어떤 **유형** 든 다른 **유형**.

<table><thead><tr><th width="135">유형 From -> To</th><th width="96">불리언</th><th width="86">문자열</th><th width="100">정수</th><th width="102">빅인트</th><th width="102">부동 소수점</th><th>타임스탬프</th></tr></thead><tbody><tr><td>불리언</td><td>동일</td><td>예</td><td>예</td><td>예</td><td>아니요</td><td>아니요</td></tr><tr><td>문자열</td><td>예</td><td>동일</td><td>숫자만</td><td>숫자만</td><td>숫자만</td><td>숫자만</td></tr><tr><td>정수</td><td>예</td><td>예</td><td>동일</td><td>예</td><td>예</td><td>숫자만</td></tr><tr><td>빅인트</td><td>예</td><td>예</td><td>예</td><td>동일</td><td>예</td><td>숫자만</td></tr><tr><td>부동 소수점</td><td>예</td><td>예</td><td>예</td><td>예</td><td>동일</td><td>숫자만</td></tr><tr><td>타임스탬프</td><td>아니요</td><td>예</td><td>아니요</td><td>아니요</td><td>아니요</td><td>동일</td></tr></tbody></table>

### 사용자 지정 스키마 보관 및 보관 해제

Panther에서는 사용자 지정 스키마를 보관하거나 보관 해제할 수 있습니다. 더 이상 데이터 수집에 사용되지 않아 Panther의 다양한 드롭다운 선택기에서 옵션으로 표시되지 않도록 하려면 스키마를 보관할 수 있습니다. 스키마를 보관하려면 해당 스키마가 어떤 로그 소스에서도 사용되고 있지 않아야 합니다. 보관된 스키마는 영구적으로 삭제할 수 없으며 무기한 존재합니다.

스키마를 보관해도 해당 스키마를 사용하여 이미 저장된 데이터 레이크의 데이터에는 영향을 주지 않습니다—해당 데이터는 여전히 [panther\_monitor](https://docs.panther.com/ko/search/data-explorer) 와 [로그 소스가 구성된 후에는 수집된 데이터를 사용하여 검색할 수 있습니다](https://docs.panther.com/ko/search/search-tool)을 사용하여 쿼리할 수 있습니다. 기본적으로 보관된 스키마는 스키마 목록 보기(에서 표시되는)에 나타나지 않지만, **구성** > **스키마**을 수정하여 표시할 수 있습니다. **상태**내에서 **필터**오른쪽 상단의. 에서는 보관된 스키마의 표가 [panther\_monitor](https://docs.panther.com/ko/search/data-explorer)테이블 **아래에 표시되지 않습니다.**.

보관된 스키마와 동일한 이름으로 새 스키마를 생성하려고 하면 이름 충돌이 발생하며 대신 기존 스키마를 보관 해제하고 편집하라는 메시지가 표시됩니다.

사용자 지정 스키마를 보관 또는 보관 해제하려면:

1. Panther 콘솔에서 로 이동하십시오 **구성** > **스키마**.
   * 보관하거나 보관 해제하려는 스키마를 찾으십시오.
2. 스키마 행의 오른쪽에서 **클릭하십시오** 이전에 생성한 Snowflake 사용자 이름, 예를 들면 **보관** 보관 해제

   <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-10776143f6386f18e873bfe23b4eb0822899aa45%2Farchiveschema.png?alt=media" alt="Two schema rows are shown, one that is currently archived and one that is currently unarchived. The archive/unarchive icons in each of their rows is circled."><figcaption></figcaption></figure>

   * 아이콘. **스키마를 보관하는 중이고 해당 스키마가 현재 하나 이상 로그 소스와 연결되어 있으면 확인 모달에서 먼저 스키마를 분리하라는 메시지가 표시됩니다. 분리한 후 클릭하십시오**.\
     ![An Archive Schema modal says, "Prior to archiving Custom.HarryPotterFake2, it must be detached from all associated Log Sources." A list of associated log sources is shown, with only one value: Carrie Tines Test](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-7ba052b56409b8da6c1cef102045170403ed4bee%2FScreenshot%202023-03-07%20at%209.34.55%20AM.png?alt=media)
3. 새로 고침 **계속**.

### 확인 모달에서 클릭하십시오

{% hint style="info" %}
사용자 지정 스키마 테스트 [스키마 편집 페이지에 있는 "샘플 로그에 대해 스키마 테스트" 기능은 Lines, CSV(헤더 유무 상관없음), JSON, JSON 배열, XML, CloudWatch Logs 및 Auto를 지원합니다. 예시는](https://docs.panther.com/ko/data-onboarding/reference#stream-type) 스트림 유형

입니다.

* gzip
* zstd (사전 없이)

또한 위의 로그 형식은 다음 형식으로 압축될 수 있습니다:
{% endhint %}

멀티라인 로그는 JSON 및 JSONArray 형식에서 지원됩니다.

1. 사용자 지정 스키마가 로그에 대해 작동하는지 확인하려면 샘플 로그로 테스트할 수 있습니다: **구성 > 스키마**.
2. Panther 콘솔의 왼쪽 탐색 막대에서 클릭하십시&#xC624;**.**
3. 사용자 지정 스키마 이름을 클릭하십시오 **스키마 테스트**.

   <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-bfc9ab86accd41a32ada43dacc42bab377592e1f%2FtestSchema.png?alt=media" alt="A schema&#x27;s name is shown. To its right are two buttons: Test Schema and Clone."><figcaption></figcaption></figure>

## 스키마 세부 정보 페이지 오른쪽 상단에서 클릭하십시오

Panther 콘솔 외부에서 스키마를 관리하려는 경우, 예를 들어 버전 관리를 위해 및 업데이트 전에 변경 사항을 검토하려는 경우, YAML 파일을 [프로그램 방식으로 업로드할 수 있습니다](https://docs.panther.com/ko/panther/detections-repo/pat) Panther 분석 도구

(PAT). `업로더 명령은 기본 경로를 인수로 받아 확장자가 있는 모든 파일을 재귀적으로 검색합니다` 와 `.yml`.

{% hint style="info" %}
.yaml
{% endhint %}

```
스키마 파일을 관련 없는 파일과 분리하여 저장하는 것이 권장됩니다. 그렇지 않으면 유효하지 않은 스키마 파일 업로드 시 업로드 중 오류가 발생할 수 있습니다.
```

panther\_analysis\_tool update-custom-schemas --path ./schemas

{% hint style="warning" %}
사용자를 사용할 것이며, `업로더는 기존 스키마가 있는지 확인한 다음 일치하는 스키마 이름이 없으면 새 스키마를 생성하거나 업데이트를 진행합니다.` 스키마 [아래 예제 스키마에서 첫 번째 탭은 JSON 로그 구조를 표시하고 두 번째 탭은 로그 스키마를 보여줍니다.](https://docs.panther.com/data-onboarding/custom-log-types/reference#ci-cd-schema-fields).
{% endhint %}

필드는 YAML 파일에 항상 정의되어야 하며 업데이트가 성공하려면 기존 스키마 이름과 일치해야 합니다. 사용 가능한 모든 CI/CD 필드 목록은 우리의

## PAT을 통해 업로드된 스키마는 Panther 콘솔에서 수행한 업데이트와 동일한 기준으로 검증됩니다.

Panther 지식 기반을 방문하여 [사용자 지정 로그 문제 해결하기 (Troubleshooting custom logs) 보기 기사들](https://help.panther.com/Data_Sources/Custom_Logs) 자주 묻는 질문에 답하고 일반적인 오류와 문제를 해결하는 데 도움이 됩니다.
