# GitLab 로그

## 개요

Panther는 다음을 사용하여 GitLab 로그 온보딩을 지원합니다 [데이터 전송](/ko/data-onboarding/data-transports.md) 메커니즘.

이 페이지에서는 두 가지 절차를 설명합니다. GitLab 감사 로그에 대한 온보딩 절차와, 기타 모든 GitLab 로그 유형에 대한 온보딩 절차입니다. 감사 로그는 다음을 통해 수집되므로 이 절차들은 다릅니다 [GitLab 감사 이벤트 스트리밍](https://docs.gitlab.com/ee/administration/audit_event_streaming/)를 사용하며, 비감사 로그는 GitLab API를 통해 가져옵니다.

감사 로그는 다음을 사용하여 수집할 수 있습니다 [HTTP Source](/ko/data-onboarding/data-transports/http.md)이며, 다른 GitLab 로그는 Amazon Web Services(AWS) [S3](/ko/data-onboarding/data-transports/aws/s3.md) 및 [SQS](/ko/data-onboarding/data-transports/aws/sqs.md).

{% hint style="warning" %}
다음을 사용하여 GitLab 감사 로그를 Panther로 수집하려면 [감사 이벤트 스트리밍](https://docs.gitlab.com/ee/administration/audit_event_streaming/) 아래에 설명된 대로, 다음이 필요합니다 [GitLab Ultimate](https://about.gitlab.com/pricing/).
{% endhint %}

## GitLab 감사 스트리밍 로그를 Panther에 온보딩하는 방법

이 절차에서는 GitLab [감사](#gitlab.audit) 로그를 온보딩하는 방법을 설명합니다. 다음과 같은 다른 유형의 GitLab 로그를 온보딩하려면 [API](#gitlab.api), [예외](#gitlab.exceptions), [통합](#gitlab.integrations), [Git](#gitlab.git), 및 [Production](#gitlab.production) 로그는 별도의 아래 [비감사 GitLab 로그를 Panther에 온보딩하는 방법](#how-to-onboard-non-audit-gitlab-logs-to-panther) 절차를 따르세요.

### 1단계: Panther에 HTTP Source 만들기

1. Panther Console의 왼쪽 탐색 모음에서 **구성하세요.** > **로그 소스**.
2. 을 클릭한 다음 **새로 만들기**.
3. “GitLab”을 검색한 다음 해당 타일을 클릭합니다.
   * 슬라이드아웃 패널에서 **Transport Mechanism** 오른쪽 상단의 드롭다운은 다음 항목으로 미리 채워집니다 **HTTP** 옵션.
4. 을 클릭한 다음 **설정 시작**.\
   ![On the GitLab page of the source setup process in Panther, there is a Transport Mechanism dropdown field with a value of HTTP. To its right is a Start Setup button.](/files/41797f750e93ebe7a5892bcde95ea2006ab8fde2)
5. Panther의 [HTTP Source 구성 지침을 따르세요](/ko/data-onboarding/data-transports/http.md#how-to-set-up-an-http-log-source-in-panther)의 5단계부터 시작합니다.
   * 다음을 사용해야 합니다 [공유 비밀 인증](/ko/data-onboarding/data-transports/http.md#shared-secret). 이것이 GitLab이 지원하는 유일한 인증 방법입니다.
   * 그 **헤더 이름** 과 연결된 **비밀 키 값** 은 다음 값으로 잠깁니다 `x-panther-gitlab`.
   * 이 소스로 전송되는 페이로드는 다음의 적용을 받습니다 [모든 HTTP 소스에 대한 페이로드 요구 사항](/ko/data-onboarding/data-transports/http.md#payload-requirements).
   * HTTP 엔드포인트 생성이 완료될 때까지 다음 단계로 진행하지 마세요.

### 2단계: GitLab에서 감사 로그 스트리밍 설정

* GitLab 문서에서 다음을 따르세요 [새 HTTP 대상 추가](https://docs.gitlab.com/ee/administration/audit_event_streaming/#add-a-new-http-destination) 절차.
  * 다음 **대상** 필드에 1단계에서 생성한 URL을 입력합니다.
  * 이름이 다음인 헤더를 추가하세요 `x-panther-gitlab` 그리고 1단계에서 Panther에 구성한 비밀을 추가합니다.

## 비감사 GitLab 로그를 Panther에 온보딩하는 방법

아래 절차는 다음과 같은 비감사 GitLab 로그를 Panther에 온보딩하는 방법을 설명합니다 [API](#gitlab.api), [예외](#gitlab.exceptions), [Git](#gitlab.git), [통합](#gitlab.integrations), 및 [Production](#gitlab.production) 로그. 만약 다음을 온보딩하려면 [감사](#gitlab.audit) 로그는 별도의 아래 [GitLab 감사 스트리밍 로그를 Panther에 온보딩하는 방법](#how-to-onboard-gitlab-audit-streaming-logs-to-panther) 위의 절차를 따르세요.

이 로그를 Panther에 연결하려면:

1. Panther 콘솔에 로그인합니다.
2. 왼쪽 사이드바에서 다음을 클릭합니다 **Configure > Log Sources**.
3. 을 클릭한 다음 **새로 만들기**.
4. 온보딩하려는 로그 유형을 검색한 다음 해당 타일을 클릭합니다.
5. 이 통합에 사용할 데이터 전송 방법을 선택한 다음, 해당 방법을 구성하기 위한 Panther의 지침을 따르세요:
   * [AWS S3 버킷](/ko/data-onboarding/data-transports/aws/s3.md)
   * [AWS SQS](/ko/data-onboarding/data-transports/aws/sqs.md)
6. GitLab을 구성하여 로그를 Data Transport 소스로 푸시합니다.
   * 선택한 Data Transport 소스로 로그를 푸시하는 방법은 GitLab 문서를 참조하세요.

## 지원되는 로그 유형

### GitLab.API

Panther는 GitLab API 로그의 최신 버전을 사용합니다. 일부 필드는 공식 문서와 다릅니다.

참조: [API JSON 로그에 대한 GitLab 문서](https://docs.gitlab.com/ee/administration/logs/#api_jsonlog).

```yaml
스키마: GitLab.API
description: |-
    GitLab에서 수신한 API 요청에 대한 GitLab 로그.
    참고: 최신 버전의 GitLab API 로그를 사용하고 있습니다. 일부 필드는 공식 문서와 다릅니다
referenceURL: https://docs.gitlab.com/ee/administration/logs/#api_jsonlog
fields:
    - 이름: time
      required: true
      설명: 요청 타임스탬프
      type: timestamp
      timeFormats:
        - rfc3339
      isEventTime: true
    - 이름: severity
      required: true
      설명: 로그 수준
      type: string
    - 이름: duration_s
      required: true
      설명: 요청 처리에 소요된 시간(초)
      type: float
    - 이름: db_duration_s
      설명: 데이터베이스 쿼리에 소요된 시간(초)
      type: float
    - 이름: view_duration_s
      설명: Rails 컨트롤러에 대한 뷰 렌더링에 소요된 시간(초)
      type: float
    - 이름: status
      required: true
      설명: HTTP 응답 상태 코드
      type: smallint
    - 이름: method
      required: true
      설명: 요청의 HTTP 메서드
      type: string
    - 이름: path
      required: true
      설명: 요청의 URL 경로
      type: string
    - 이름: params
      설명: URL 쿼리 매개변수
      type: array
      element:
        type: object
        fields:
            - 이름: key
              required: true
              설명: 쿼리 매개변수 이름
              type: string
            - 이름: value
              설명: 쿼리 매개변수 값
              유형: json
    - 이름: host
      required: true
      설명: 요청을 처리하는 호스트 이름
      type: string
      indicators:
        - hostname
    - 이름: ua
      설명: User-Agent HTTP 헤더
      type: string
    - 이름: route
      required: true
      설명: API 엔드포인트의 Rails 경로
      type: string
    - 이름: remote_ip
      설명: HTTP 요청의 원격 IP 주소
      type: string
      indicators:
        - ip
    - 이름: user_id
      설명: 요청한 사용자의 ID
      type: bigint
    - 이름: username
      설명: 요청한 사용자의 사용자 이름
      type: string
      indicators:
        - username
    - 이름: gitaly_calls
      설명: Gitaly에 대한 총 호출 수
      type: bigint
    - 이름: gitaly_duration_s
      설명: Gitaly 호출에 걸린 총 시간
      type: float
    - 이름: redis_calls
      설명: Redis에 대한 총 호출 수
      type: bigint
    - 이름: redis_duration_s
      설명: Redis에서 데이터를 검색하는 데 걸린 총 시간
      type: float
    - 이름: correlation_id
      설명: 로그 전반의 요청 고유 ID
      type: string
      indicators:
        - trace_id
    - 이름: queue_duration_s
      설명: GitLab Workhorse 내부에서 요청이 큐에 대기한 총 시간
      type: float
    - 이름: meta.user
      설명: 요청을 호출한 사용자
      type: string
      indicators:
        - username
    - 이름: meta.project
      설명: 요청과 연결된 프로젝트
      type: string
    - 이름: meta.root_namespace
      설명: 루트 네임스페이스
      type: string
    - 이름: meta.caller_id
      설명: 호출자 ID
      type: string
```

### GitLab.Audit

자체 호스팅 감사 로그 파일과 GitLab의 감사 이벤트 스트리밍 기능 모두에 대한 다중 사용 스키마.

자세한 내용은 다음을 참조하세요. [감사 JSON 로그에 대한 GitLab 문서](https://docs.gitlab.com/ee/administration/logs/#audit_jsonlog) 및 [감사 이벤트 스트리밍에 대한 GitLab 문서](https://docs.gitlab.com/ee/administration/audit_event_streaming/).

```yaml
스키마: GitLab.Audit
설명: '자체 호스팅 감사 로그 파일과 GitLab의 감사 이벤트 스트리밍 기능 모두에서 오는 GitLab 감사 이벤트를 위한 다중 사용 스키마: https://docs.gitlab.com/ee/administration/audit_event_streaming/'
referenceURL: https://docs.gitlab.com/ee/administration/logs/#audit_jsonlog
fields:
    - 이름: severity
      설명: 로그 수준. 감사 로그 파일에만 존재합니다.
      type: string
    - 이름: time
      설명: 이벤트 타임스탬프. 감사 로그 파일에만 존재합니다.
      type: timestamp
      timeFormats:
        - rfc3339
      isEventTime: true
    - 이름: author_id
      required: true
      설명: 변경을 수행한 사용자 ID
      type: bigint
    - 이름: entity_id
      required: true
      설명: 수정된 엔터티의 ID
      type: bigint
    - 이름: entity_type
      required: true
      설명: 수정된 엔터티 유형
      type: string
    - 이름: change
      설명: 설정 변경 유형. 감사 로그 파일에만 존재합니다.
      type: string
    - 이름: from
      설명: 이전 설정 값. 감사 로그 파일에만 존재합니다.
      type: string
    - 이름: to
      설명: 새 설정 값. 감사 로그 파일에만 존재합니다.
      type: string
    - 이름: author_name
      required: true
      설명: 변경을 수행한 사용자의 이름
      type: string
    - 이름: target_id
      설명: 수정된 설정의 대상 ID
      type: bigint
    - 이름: target_type
      설명: 수정된 설정의 대상 유형
      type: string
    - 이름: target_details
      설명: 수정된 설정 대상의 세부 정보
      type: string
    - 이름: created_at
      설명: 이벤트가 트리거된 시각의 타임스탬프. 감사 이벤트 스트리밍에만 존재합니다
      type: timestamp
      timeFormats:
        - rfc3339
      isEventTime: true
    - 이름: details
      설명: 추가 메타데이터가 포함된 JSON 객체. 감사 이벤트 스트리밍에만 존재합니다
      유형: json
    - 이름: entity_path
      설명: 감사 가능한 이벤트의 영향을 받은 엔터티의 전체 경로. 감사 이벤트 스트리밍에만 존재합니다
      type: string
    - 이름: event_type
      설명: 감사 이벤트 유형의 문자열 표현. 감사 이벤트 스트리밍에만 존재합니다
      type: string
    - 이름: id
      설명: 감사 이벤트의 고유 식별자. 감사 이벤트 스트리밍에만 존재합니다
      type: string
    - 이름: ip_address
      설명: 이벤트를 트리거하는 데 사용된 호스트의 IP 주소. 감사 이벤트 스트리밍에만 존재합니다
      type: string
      indicators:
        - ip
```

### GitLab.Exceptions

그룹 또는 프로젝트 설정 변경이 포함된 GitLab 로그 파일

참조: [JSON 로그의 예외에 대한 GitLab 문서](https://docs.gitlab.com/ee/administration/logs/#exceptions_jsonlog).

```yaml
스키마: GitLab.Exceptions
설명: 그룹 또는 프로젝트 설정 변경이 포함된 GitLab 로그 파일
referenceURL: https://docs.gitlab.com/ee/administration/logs/#exceptions_jsonlog
fields:
    - 이름: severity
      required: true
      설명: 로그 수준
      type: string
    - 이름: time
      required: true
      설명: 이벤트 타임스탬프
      type: timestamp
      timeFormats:
        - rfc3339
      isEventTime: true
    - 이름: correlation_id
      설명: 로그 전반의 요청 고유 ID
      type: string
      indicators:
        - trace_id
    - 이름: extra.server
      설명: 예외가 발생한 서버에 대한 정보
      type: object
      fields:
        - 이름: os
          설명: 서버 OS 정보
          type: object
          fields:
            - 이름: name
              설명: OS 이름
              type: string
            - 이름: version
              설명: OS 버전
              type: string
            - 이름: build
              설명: OS 빌드
              type: string
        - 이름: runtime
          설명: GitLab 코드를 실행하는 런타임
          type: object
          fields:
            - 이름: name
              설명: 런타임 이름
              type: string
            - 이름: version
              설명: 런타임 버전
              type: string
    - 이름: extra.project_id
      설명: 예외가 발생한 프로젝트 ID
      type: bigint
    - 이름: extra.relation_key
      설명: 예외가 발생한 관계
      type: string
    - 이름: extra.relation_index
      설명: 예외가 발생한 관계 인덱스
      type: bigint
    - 이름: exception.class
      required: true
      설명: 발생한 예외의 클래스 이름
      type: string
    - 이름: exception.message
      required: true
      설명: 발생한 예외의 메시지
      type: string
    - 이름: exception.backtrace
      설명: 발생한 예외의 스택 추적
      type: array
      element:
        type: string
```

### GitLab.Git

GitLab에서 Git 저장소로의 모든 실패한 요청이 포함된 GitLab 로그 파일.

참조: [JSON 로그의 git에 대한 GitLab 문서](https://docs.gitlab.com/ee/administration/logs/#git_jsonlog).

```yaml
스키마: GitLab.Git
설명: GitLab에서 Git 저장소로의 모든 실패한 요청이 포함된 GitLab 로그 파일.
referenceURL: https://docs.gitlab.com/ee/administration/logs/#git_jsonlog
fields:
    - 이름: severity
      required: true
      설명: 로그 수준
      type: string
    - 이름: time
      required: true
      설명: 이벤트 타임스탬프
      type: timestamp
      timeFormats:
        - rfc3339
      isEventTime: true
    - 이름: correlation_id
      설명: 로그 전반의 고유 ID
      type: string
      indicators:
        - trace_id
    - name: message
      required: true
      설명: git의 오류 메시지
      type: string
```

### GitLab.Integrations

Jira, Asana, Irker 서비스와 같은 통합 활동에 대한 정보가 포함된 GitLab 로그.

참조: [JSON 로그의 통합에 대한 GitLab 문서](https://docs.gitlab.com/ee/administration/logs/#integrations_jsonlog).

```yaml
스키마: GitLab.Integrations
설명: Jira, Asana, Irker 서비스와 같은 통합 활동에 대한 정보가 포함된 GitLab 로그.
referenceURL: https://docs.gitlab.com/ee/administration/logs/#integrations_jsonlog
fields:
    - 이름: severity
      required: true
      설명: 로그 수준
      type: string
    - 이름: time
      required: true
      설명: 이벤트 타임스탬프
      type: timestamp
      timeFormats:
        - rfc3339
      isEventTime: true
    - 이름: service_class
      required: true
      설명: 통합된 서비스의 클래스 이름
      type: string
    - 이름: project_id
      required: true
      설명: 통합이 실행 중이던 프로젝트 ID
      type: bigint
    - 이름: project_path
      required: true
      설명: 통합이 실행 중이던 프로젝트 경로
      type: string
    - name: message
      required: true
      설명: 서비스의 로그 메시지
      type: string
    - 이름: client_url
      required: true
      설명: 서비스의 클라이언트 URL
      type: string
      indicators:
        - url
    - 이름: error
      설명: 오류가 발생한 경우의 오류 이름
      type: string
```

### GitLab.Production

GitLab에서 수신한 Production 컨트롤러 요청에 대한 GitLab 로그

참조: [JSON 로그의 production에 대한 GitLab 문서](https://docs.gitlab.com/ee/administration/logs/#production_jsonlog).

```yaml
스키마: GitLab.Production
설명: GitLab에서 수신한 Production 컨트롤러 요청에 대한 GitLab 로그
referenceURL: https://docs.gitlab.com/ee/administration/logs/#production_jsonlog
fields:
    - 이름: method
      required: true
      설명: 요청의 HTTP 메서드
      type: string
    - 이름: path
      required: true
      설명: 요청의 URL 경로
      type: string
    - 이름: format
      설명: 응답 출력 형식
      type: string
    - 이름: controller
      설명: Production 컨트롤러 클래스 이름
      type: string
    - 이름: action
      설명: Production 컨트롤러 액션
      type: string
    - 이름: status
      required: true
      설명: HTTP 응답 상태 코드
      type: bigint
    - 이름: time
      required: true
      설명: 요청 타임스탬프
      type: timestamp
      timeFormats:
        - rfc3339
      isEventTime: true
    - 이름: params
      설명: URL 쿼리 매개변수
      type: array
      element:
        type: object
        fields:
            - 이름: key
              required: true
              설명: 쿼리 매개변수 이름
              type: string
            - 이름: value
              설명: 쿼리 매개변수 값
              유형: json
    - 이름: remote_ip
      설명: HTTP 요청의 원격 IP 주소
      type: string
      indicators:
        - ip
    - 이름: user_id
      설명: 요청한 사용자의 ID
      type: bigint
    - 이름: username
      설명: 요청한 사용자의 사용자 이름
      type: string
      indicators:
        - username
    - 이름: ua
      설명: 요청자의 User-Agent
      type: string
    - 이름: queue_duration_s
      설명: GitLab Workhorse 내부에서 요청이 큐에 대기한 총 시간
      type: float
    - 이름: gitaly_calls
      설명: Gitaly에 대한 총 호출 수
      type: bigint
    - 이름: gitaly_duration_s
      설명: Gitaly 호출에 걸린 총 시간
      type: float
    - 이름: redis_calls
      설명: Redis에 대한 총 호출 수
      type: bigint
    - 이름: redis_duration_s
      설명: Redis에서 데이터를 검색하는 데 걸린 총 시간
      type: float
    - 이름: redis_read_bytes
      설명: Redis에서 읽은 총 바이트 수
      type: bigint
    - 이름: redis_write_bytes
      설명: Redis에 쓴 총 바이트 수
      type: bigint
    - 이름: correlation_id
      설명: 로그 전반의 요청 고유 ID
      type: string
      indicators:
        - trace_id
    - 이름: cpu_s
      설명: CPU에서 소요된 총 시간
      type: float
    - 이름: db_duration_s
      설명: PostgreSQL에서 데이터를 검색하는 데 걸린 총 시간
      type: float
    - 이름: view_duration_s
      설명: Rails 뷰 내부에서 걸린 총 시간
      type: float
    - 이름: duration_s
      required: true
      설명: 요청을 검색하는 데 걸린 총 시간
      type: float
    - 이름: meta.caller_id
      설명: 호출자 ID
      type: string
    - 이름: location
      설명: (리디렉션에만 적용) 리디렉션 URL
      type: string
    - 이름: exception.class
      설명: 발생한 예외의 클래스 이름
      type: string
    - 이름: exception.message
      설명: 발생한 예외의 메시지
      type: string
    - 이름: exception.backtrace
      설명: 발생한 예외의 스택 추적
      type: array
      element:
        type: string
    - 이름: etag_route
      설명: 경로 이름 etag(리디렉션 시)
      type: string
```


---

# Agent Instructions: 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:

```
GET https://docs.panther.com/ko/data-onboarding/supported-logs/gitlab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
