> For the complete documentation index, see [llms.txt](https://docs.panther.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.panther.com/ko/pantherflow/best-practices.md).

# PantherFlow 모범 사례

## 개요

{% hint style="info" %}
PantherFlow는 Panther 버전 1.110부터 공개 베타로 제공되며, 모든 고객이 사용할 수 있습니다. 버그 보고와 기능 요청은 Panther 지원팀에 공유해 주세요.
{% endhint %}

PantherFlow 쿼리 결과를 가능한 한 빨리 반환하고(검색으로 인해 발생하는 데이터 레이크 비용을 최소화하고), 아래 모범 사례를 따르는 것이 권장됩니다.

적용한 후에도 쿼리가 여전히 느리게 실행된다면:

* 쿼리의 시간 범위를 줄이세요.
* 쿼리가 완료되면 반환된 행 수를 확인해 얼마나 많은 데이터를 조회하고 있는지 파악하세요. 양이 많다면 시간이 걸리는 것이 예상됩니다.
* 추가 도움이 필요하면 Panther 지원팀에 문의하세요.

## 일반 PantherFlow 모범 사례

### **다음 `limit` 연산자**

다음 [`limit` 연산자](/ko/pantherflow/operators/limit.md) 를 사용해 쿼리가 반환할 최대 레코드 수를 지정하세요.

예: `panther_logs.public.aws_alb | limit 100`

### **시간 범위 필터 사용**

다음 [`where` 연산자](/ko/pantherflow/operators/where.md) 를 사용해 시간 범위로 필터링하세요(아마도 `p_event_time`을 기준으로). 시간 범위 필터가 있는 쿼리는 더 적은 [마이크로 파티션](https://docs.snowflake.com/en/user-guide/tables-clustering-micropartitions)에 접근하므로 결과를 더 빨리 반환합니다.

예: `panther_logs.public.aws_alb | where p_event_time > time.ago(1d)`

에 대해 자세히 알아보기 [에서 사용 가능한 시간 함수](/ko/pantherflow/functions.md#date-time).

### **사용 `p_any` 필드**

로그 수집 중 Panther는 일반적인 보안 지표를 `p_any` 필드에 추출하며, 이를 통해 모든 데이터 소스에서 속성 이름이 표준화됩니다. 해당 `p_any` 필드는 최적화된 열에 저장됩니다. 여러 로그 유형에 대해 서로 다른 이름의 필드보다 `p_any` 필드를 쿼리하는 것이 권장됩니다.

에서 자세히 알아보기 [표준 필드](https://docs.panther.com/search/panther-fields).

예: `panther_logs.public.aws_alb | '10.0.0.0' in p_any_ip_addresses`

### **다음 `project` 연산자**

가 없는 쿼리는 [`project` 연산자](/ko/pantherflow/operators/project.md) 모든 열을 가져오므로 쿼리가 느려질 수 있습니다. 가능하면 `project` 을 사용해 조사에 필요한 필드만 쿼리하세요.

예: `panther_logs.public.aws_alb | project targetIp, targetPort`

### **결과 요약**

요약은 전체 로그 레코드를 가져오는 쿼리보다 더 빠르게 실행됩니다. 긴 기간의 로그를 조사할 때나, 조사 중인 시간 범위에 데이터 볼륨이 얼마나 있는지 모를 때 특히 유용합니다.

전체 데이터 세트를 쿼리하는 대신 [`summarize` 연산자](/ko/pantherflow/operators/summarize.md)를 사용하세요. 그러면 더 빠르게 실행되며 다음에 조회할 더 좁은 시간 범위를 파악하는 데 도움이 됩니다.

예: `panther_logs.public.aws_alb | summarize count=agg.count() by targetIp`

에 대해 자세히 알아보기 [에서 사용 가능한 집계 함수](/ko/pantherflow/functions.md#aggregations).

### **다음으로 데이터 필터링 `where`**

다음이 있는 절을 사용해 데이터 필터링 [`where`](/ko/pantherflow/operators/where.md) 같은 비용이 큰 작업을 수행하기 전에 [`summarize`](/ko/pantherflow/operators/summarize.md) 또는 [`join`](/ko/pantherflow/operators/join.md)보다 먼저 필터링하세요.

예:

```kusto
// 대신:
panther_logs.public.aws_alb 
| summarize agg.count() by actor 
| where actor != nil

// 이렇게 사용:
panther_logs.public.aws_alb 
| where actor != nil 
| summarize agg.count() by actor 
```

### **다음 사용을 피하세요. `search` 연산자**

이 [`search` 연산자](/ko/pantherflow/operators/search.md) 는 속도를 저하시킬 수 있으며, 필요한 경우가 아니면 피해야 합니다. 검색하려는 텍스트가 포함되어 있을 수 있는 열이 어떤 것인지 알고 있다면, 지정한 데이터베이스/테이블의 *모든* 열을 다음으로 검색하는 대신 `search`, 다음을 사용하세요. [`where`](/ko/pantherflow/operators/where.md) 다음과 함께 [`strings.contains()`](https://docs.panther.com/ko/pantherflow/pages/e5c4ab662f13148d5d148a22c398090241e61a1c#strings.contains).

예:

* 대신: `| search 'alice'`
* 다음 사용: `| where strings.contains(name, 'alice')`

## PantherFlow에서 모든 로그를 가장 잘 검색하는 방법

PantherFlow에서 모든 로그를 검색하려면 다음을 사용하세요. [`union` 연산자](/ko/pantherflow/operators/union.md):

```kusto
union panther_logs.public.*
```

{% hint style="info" %}
추가 최적화 `union` 가 계획되어 있습니다.
{% endhint %}

검색하려는 값이 어떤 열에 나타나야 하는지 알고 있다면(예를 들어 지표 검색을 수행하는 경우— [`p_any` 필드](/ko/search/panther-fields.md#indicator-fields)에서 침해 지표(IoC)를 검색하는 경우), `union panther_logs.public.*` 검색을 최적화할 수 있습니다. 관련된 열에만 IoC를 검색하도록 [`project`](/ko/pantherflow/operators/project.md) 및 [`where`](/ko/pantherflow/operators/where.md) 필터를 추가하세요:

```kusto
union panther_logs.public.*
| project p_event_time, p_any_ip_addresses
| where p_event_time > time.ago(1d)
| where p_any_ip_addresses != null
| where 'ip1' in p_any_ip_addresses or 'ip2' in p_any_ip_addresses
```

Panther에서 다음을 사용해 지표 검색을 수행할 수도 있습니다:

* (권장) 다음 [검색](/ko/search/search-tool.md) 도구: 다음을 참조하세요. [침해 지표 검색](/ko/search/search-tool.md#searching-indicators-of-compromise)
  * 검색에는 모든 로그를 효율적으로 검색할 수 있도록 기본 제공 최적화가 있습니다.
* 이 `executeIndicatorSearchQuery` [GraphQL API](/ko/panther/api/graphql.md) 엔드포인트: 예시를 확인하세요 [여기](/ko/panther/api/graphql/data-lake-queries.md#execute-a-search-query)
* [Panther AI](/ko/ai.md): 올바른 [데이터 검색 및 분석 도구가](/ko/ai.md#data-search-and-analysis) 자동으로 선택됩니다

{% hint style="warning" %}
다음과 함께 모든 로그를 쿼리하지 마세요. `panther_views` 데이터베이스—이는 [폐기 예정입니다](https://docs.panther.com/search/backend#panther-views).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.panther.com/ko/pantherflow/best-practices.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
