# 운영

## 데이터 수집 볼륨 평가

다음을 사용할 수 있습니다. [Panther API 메트릭 작업](https://docs.panther.com/ko/panther/api/graphql/metrics) Panther가 특정 기간 동안 수집하거나 처리한 총 바이트 수와 이벤트 수를 측정하기 위해. 데이터 수집 볼륨을 평가하는 다른 방법은 아래 섹션을 참조하세요.

### Panther의 SaaS 배포

이 데이터에 접근하는 데 도움이 필요하면 Panther 계정 팀에 문의하세요.

### Panther의 자체 호스팅 및 CPaaS 배포

{% hint style="warning" %}
아래 정보는 다음에 적용됩니다. [자체 호스팅](https://docs.panther.com/ko/system-configuration/panther-deployment-types/legacy-configurations/self-hosted-deployments) 및 CPaaS 배포 유형.
{% endhint %}

Panther 로그 분석 CloudWatch 대시보드는 로그 처리의 운영상 관련된 측면에 대한 심층적인 통찰을 제공합니다. 수집 볼륨을 이해하는 것은 Panther 운영 비용을 예측하는 데 매우 중요합니다.

Panther Console의 대시보드에서 수집된 로그의 볼륨을 볼 수 있습니다. 이는 AWS 청구서와 함께 사용하여 데이터가 증가함에 따라 비용을 예측하는 데 활용할 수 있습니다. 비용 추정을 위해 한 달 분량의 데이터를 사용할 것을 권장합니다.

CloudWatch 대시보드를 보려면:

1. AWS Console에 로그인합니다.
2. 다음을 클릭하세요. **CloudWatch** 를 서비스 메뉴에서 선택합니다.
3. 다음을 클릭하세요. **대시보드** 를 CloudWatch 콘솔의 왼쪽 사이드바에서 선택합니다.\
   ![The image shows the AWS CloudWatch sidebar menu.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-d73363cb2957a1df2f2c49b8ce540848e2184843%2Fcloudwatch-dashboards.png?alt=media)
4. 다음으로 시작하는 대시보드 이름을 클릭합니다. `PantherLogAnalysis`\
   ![The image shows a list of Dashboards in AWS CloudWatch.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-a8c8aebac6e691b670d6ab1201f196b77baa4ff3%2Fcloudwatch-dashboards-log-analysis%20\(6\)%20\(6\)%20\(4\).png?alt=media)
5. "Input MBytes (Uncompressed) by Log Type"라는 제목의 타일 오른쪽 상단 모서리에 있는 점 세 개 아이콘을 클릭합니다. 드롭다운 메뉴에서 다음을 클릭합니다. **CloudWatch Insights에서 보기**.\
   ![In AWS CloudWatch, there is a tile labeled "Input MBytes (Uncompressed) by Log Type". On the right side of the tile, there is a 3 dots icon. It is expanded to show a dropdown menu, with the option "View in CloudWatch Logs Insights" highlighted.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-3b22855ff98da536b9756d0ff044836ee77a09a1%2Fcloudwatch-dashboards-log-analysis-input-select%20\(6\)%20\(6\)%20\(8\)%20\(5\).png?alt=media)
6. 기간을 4주로 설정한 다음 다음을 클릭합니다. **적용**.
7. Logs Insights 페이지 상단에서 다음을 클릭합니다. **쿼리 실행**.

<figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-a12e7e24ad0910118229ff4b153aa8e9ababcf51%2Fcloudwatch-dashboards-log-analysis-input-show%20(6)%20(6)%20(8)%20(6).png?alt=media" alt="The AWS CloudWatch Logs Insights page is displayed. A query is entered into the text field at the top of the page."><figcaption></figcaption></figure>

## `s3sns` 도구

Panther는 다음을 제공합니다. `s3sns`이는 S3 객체를 나열하고 S3 알림을 Panther 로그 프로세서 SNS 주제로 게시하는 운영 도구입니다. 이 도구는 Linux, Mac(Darwin 포함) 및 Windows용으로 정적으로 컴파일된 실행 파일입니다.

이 도구를 사용하려면 [AWS 자격 증명](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html) 이 환경에 충분한 권한으로 설정되어 있어야 합니다. 이를 안전하게 관리하기 위한 도구로 다음과 같은 것을 권장합니다. [AWS Vault](https://github.com/99designs/aws-vault).

{% hint style="warning" %}
Panther 팀원이 특별히 권장하지 않는 한 이 도구를 실행하지 마세요.
{% endhint %}

### 최신 버전의 다운로드 `s3sns` 도구

최신 버전의 다운로드 링크를 찾으세요. `s3sns` 아래를 참조하세요. 다음 명령을 `-h` 플래그와 함께 실행하면 사용법이 설명됩니다.

<details>

<summary><strong><code>s3sns</code> 최신 다운로드 링크</strong></summary>

다음 링크에서 최신 버전을 다운로드하세요:

* [Darwin amd64](https://panther-community-us-east-1.s3.amazonaws.com/latest/tools/darwin-amd64-s3sns.zip)
* [Darwin arm64](https://panther-community-us-east-1.s3.amazonaws.com/latest/tools/darwin-arm64-s3sns.zip)
* [Linux amd64](https://panther-community-us-east-1.s3.amazonaws.com/latest/tools/linux-amd64-s3sns.zip)
* [Linux arm64](https://panther-community-us-east-1.s3.amazonaws.com/latest/tools/linux-arm64-s3sns.zip)
* [Windows amd64](https://panther-community-us-east-1.s3.amazonaws.com/latest/tools/windows-amd64-s3sns.exe.zip)
* [Windows arm64](https://panther-community-us-east-1.s3.amazonaws.com/latest/tools/windows-arm64-s3sns.exe.zip)

</details>

### 특정 버전의 다운로드 `s3sns` 도구

최신 버전의 `s3sns` 도구를 다운로드하려면 위의 다운로드 링크를 사용하세요. 특정 버전의 도구를 다운로드하려면 아래 지침을 따르세요.

#### 1단계: Panther 버전 확인

1. Panther Console에 로그인합니다.
2. 오른쪽 상단에서 사용자 아이콘을 클릭합니다. 드롭다운 메뉴 하단에서 Panther 버전을 확인하세요.

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

#### 2단계: 다운로드 링크 구성

특정 버전의 `s3sns`를 다운로드하려면 다음 형식을 사용하여 S3 다운로드 URL을 수동으로 구성하세요:

`https://panther-community-us-east-1.s3.amazonaws.com/{version}/tools/{os}-{arch}-s3sns{windows file extension}.zip`\
\
아래 설명에 따라 다운로드 URL의 자리표시자 텍스트를 바꾸세요:

* `version`: Panther 버전, 예: `v1.114.90`. 다음을 반드시 포함하세요. `v` 버전 번호 앞에.
  * `latest` 는 다음을 대체할 수 있습니다. `version` 도구의 최신 버전을 다운로드하려면.
* `os`: 다음 중 하나를 사용하세요: `darwin`, `linux` , 또는 `windows`
* `arch`: 다음을 사용하세요. `amd64` 또는 `arm64`
* `{windows file extension}`: 만약 `os` 값이 `windows`이면 다음을 추가하세요. `.exe` 여기에. 만약 `os` 값이 `darwin` 또는 `linux`라면 여기에 아무것도 추가하지 마세요.

**다음을 사용하는 예시의 완전한 도구 링크 `{version}`**\
`https://panther-community-us-east-1.s3.amazonaws.com/v1.114.90/tools/darwin-amd64-s3sns.zip`

**다음을 사용하는 예시 다운로드 링크 `latest`**

`https://panther-community-us-east-1.s3.amazonaws.com/latest/tools/darwin-amd64-s3sns.zip`

## 모니터링

{% hint style="warning" %}
아래 정보는 레거시 [자체 호스팅](https://docs.panther.com/ko/system-configuration/panther-deployment-types/legacy-configurations/self-hosted-deployments) 및 CPaaS 배포 유형에 적용됩니다. Panther는 더 이상 신규 계정에 대해 이러한 배포 유형을 지원하지 않습니다.
{% endhint %}

### 가시성

Panther에는 시스템 운영에 대한 가시성을 제공하는 5개의 CloudWatch 대시보드가 있습니다:

* **PantherOverview** 모든 Panther 구성 요소의 모든 오류와 성능에 대한 개요.
* **PantherCloudSecurity**: CloudSecurity를 위한 인프라를 모니터링하는 구성 요소의 세부 정보.
* **PantherAlertProcessing**: CloudSecurity 및 로그 처리를 위한 경보를 전달하는 구성 요소의 세부 정보.
* **PantherLogAnalysis**: 로그를 처리하고 규칙을 실행하는 구성 요소의 세부 정보.
* **PantherRemediation**: 인프라 문제를 해결하는 구성 요소의 세부 정보.

### 알람

Panther는 각 구성 요소의 상태를 모니터링하기 위해 CloudWatch 알람을 사용합니다. 생성한 SNS 주제를 Panther CloudWatch 알람과 연결하려면 `deployments/panther_config.yml` 파일을 수정하세요. 이렇게 하면 알림을 받을 수 있습니다. 이 값이 비어 있으면 Panther는 기본 Panther SNS 주제인 `panther-alarms`:

```yaml
를 알람과 연결합니다.
  MonitoringParameterValues:
  # 이것은 Panther 시스템 알람과 연결하려는 SNS 주제의 ARN입니다.
  # 이 값이 설정되지 않으면 알람은 SNS 주제 `panther-alarms`와 연결됩니다.
```

알람이 팀에 전송되도록 구성하려면 아래 가이드를 따르세요:

* [SNS 이메일 및 SMS 통합](https://docs.aws.amazon.com/sns/latest/dg/sns-user-notifications.html)
* [PagerDuty 통합](https://support.pagerduty.com/docs/aws-cloudwatch-integration-guide)

  참고: Pager Duty는 [복합 CloudWatch 알람을 처리할 수 없습니다](https://community.pagerduty.com/forum/t/composite-alarm-in-cloudwatch-not-triggering-pd-integration/1798), 이는 Panther가 온콜 직원에게 중복 호출이 가지 않도록 하는 데 사용합니다. 임시 해결책으로 다음을 사용할 수 있습니다. `사용자 지정 이벤트 변환기`.

  다음을 따르세요. [지침 ](https://www.pagerduty.com/docs/guides/custom-event-transformer/)을 아래 코드로 사용하여:

  ```javascript
     var details = JSON.parse(PD.inputRequest.rawBody);

     var description = "unknown event";
     if ("AlarmDescription" in details) {  // CloudWatch 이벤트처럼 보임 ...
       var descLines = details.AlarmDescription.split("\n");
       description = (descLines.length > 1)? descLines[0] + " " + descLines[1] : descLines[0];
     }

     var normalized_event = {
       event_type: PD.Trigger,
       description: description,
       incident_key: description,
       details: details
     };

     PD.emitGenericEvents([normalized_event]);
  ```

  Pager Duty 구독을 생성할 때 사용할 SNS 주제를 구성하세요 `RawMessageDelivery: true` 를 설정하세요.
