Chronicle CLI 사용자 가이드

고급 사용자는 Chronicle 그래픽 사용자 인터페이스를 사용하는 대신 Chronicle 명령줄 인터페이스(CLI) chronicle_cli를 사용하여 Chronicle 워크플로를 사용할 수 있습니다.

Chronicle CLI를 사용할 수 있는 워크플로는 다음과 같습니다.

Chronicle CLI 명령어는 다음 문법을 사용합니다(COMMANDARGUMENT는 필수이지만 OPTIONS는 선택사항입니다).

$ chronicle_cli COMMAND ARGUMENT [OPTIONS]

예를 들어 피드 관리 워크플로를 사용하여 새 피드를 만들려면 다음 명령어를 사용합니다.

$ chronicle_cli feeds create

시작하기 전에

Chronicle CLI를 설치하기 전 다음을 수행합니다.

설치

이 섹션에서는 사용자 환경에 Chronicle CLI를 설치하는 방법에 대한 정보를 제공합니다.

  1. 가상 환경 venv를 만들고 활성화합니다.

  2. 다음 명령어를 사용하여 저장소를 클론합니다.

    git clone https://github.com/chronicle/cli.git
    
  3. 터미널을 열고 다음 명령어를 실행하여 가상 환경에 필요한 모든 종속 패키지를 설치합니다.

    $ cd cli
    $ (env) pip install -r requirements.txt
    
  4. 다음 명령어를 실행하여 Chronicle 바이너리를 설치합니다.

    $ (env) python3 -m pip install --editable .
    
  5. 다음 명령어를 실행하여 설치가 성공했는지 확인합니다.

    $ chronicle_cli --help
    
샘플 출력
Usage: chronicle_cli [OPTIONS] COMMAND [ARGS]...

  Chronicle CLI is a CLI tool for managing Chronicle user workflows for e.g.
  Feed Management workflows.

Options:
  -h, --help  Show this message and exit.

Commands:
  feeds  Feed Management Workflows

옵션

명령어를 실행할 때 추가 플래그를 제공하여 기본 구성을 재정의할 수 있습니다.

기본 리전 설정(--region)

명령어에 --region 플래그를 전달하여 리전을 선택하면 적합한 Chronicle 리전 백엔드에 대해 API 호출이 수행됩니다.

다음 리전을 설정할 수 있습니다.

  • ASIA-NORTHEAST1
  • ASIA-SOUTH1
  • ASIA-SOUTHEAST1
  • AUSTRALIA-SOUTHEAST1
  • EUROPE
  • EUROPE-WEST2
  • EUROPE-WEST3
  • EUROPE-WEST6
  • ME-CENTRAL2
  • ME-WEST1
  • NORTHAMERICA-NORTHEAST2
  • US

리전을 지정하지 않으면 기본 리전이 US로 설정됩니다.

피드 관리 워크플로

Chronicle CLI를 사용하여 Chronicle 인스턴스에 대한 데이터 피드를 만들고 관리할 수 있습니다.

명령어

feeds 명령어

feeds 명령어는 다음 인수를 사용합니다.

  • create
  • update
  • get
  • list
  • delete
  • enable
  • disable

사용 문법:

$ chronicle_cli feeds ARGUMENT [OPTIONS]

인수

create 인수

새 피드를 만듭니다.

사용 예시
$ chronicle_cli feeds create --help
Usage: chronicle_cli feeds create [OPTIONS]

  Create a feed

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential-path TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cli/chronicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
  • Windows 플랫폼
====================================
========== Set Properties ==========
====================================

List of Source types:
1. Amazon S3
2. Amazon SQS
3. Google Cloud Storage
4. HTTP(S) URI
5. Microsoft Azure Blob Storage
6. SFTP
7. Third party API

[Source type] Enter your choice: 7

You have selected Third party API

List of Log types:

(i) How to select log type?
  - Press ENTER key (scrolls one line at a time) or SPACEBAR key (display next screen).
  - Note down the choice number for the log type that you want to select.
  - Press 'q' to quit and enter that choice number.
=============================================================================
1. Anomali
2. Azure AD
3. Azure AD Directory Audit
4. Azure AD Organizational Context
5. Cloud Passage
6. Duo Auth
7. Duo User Context
8. Fox-IT
9. Imperva
10. Microsoft Graph API Alerts:

[Log type] Enter your choice: 7

You have selected Duo User Context

Enter feed display name: my_duo_user_context_feed

======================================
=========== Input Parameters =========
======================================
(*) - Required fields.
Password/secret inputs are hidden.

(*) Username (Username to authenticate as)
=> USERNAME

(*) Secret (Secret to authenticate with)
=>

(*) API hostname (The fully qualified domain name for your instance of the API, having the form "api-xxxxxxxx.duosecurity.com")
=> api-xxxxxxxx.duosecurity.com

Feed created successfully with Feed ID: 9cfce415-97df-413b-8e38-e7c747f9ed38
  • Linux/Ubuntu/CentOS/MacOS와 같은 다른 플랫폼
====================================
========== Set Properties ==========
====================================

List of Source types:
1. Amazon S3
2. Amazon SQS
3. Google Cloud Storage
4. HTTP(S) URI
5. Microsoft Azure Blob Storage
6. SFTP
7. Third party API

[Source type] Enter your choice: 7

You have selected Third party API

List of Log types:

(i) How to select log type?
  - Press Up/b or Down/z keys to paginate.
  - To switch case-sensitivity, press '-i' and press enter. By default, search
    is case-sensitive.
  - To search for specific log type, press '/' key, enter text and press enter.
  - Note down the choice number for the log type that you want to select.
  - Press 'q' to quit and enter that choice number.
  - Press `h` for all the available options to navigate the list.
=============================================================================
1. Anomali
2. Azure AD
3. Azure AD Directory Audit
4. Azure AD Organizational Context
5. Cloud Passage
6. Duo Auth
7. Duo User Context
8. Fox-IT
9. Imperva:

[Log type] Enter your choice: 7

You have selected Duo User Context
======================================
======================================
(*) - Required fields.
Password/secret inputs are hidden.

(*) Username (Username to authenticate as)
=> USERNAME

(*) Secret (Secret to authenticate with)
=>

(*) API hostname (The fully qualified domain name for your instance of the API, having the form "api-xxxxxxxx.duosecurity.com")
=> api-xxxxxxxx.duosecurity.com

Feed created successfully with Feed ID: 9cfce415-97df-413b-8e38-e7c747f9ed38

피드 만들기가 실패하면 다음에 실패한 피드 만들기를 재시도하라는 메시지가 표시됩니다. 다시 시도하거나 새로운 피드를 계속 만들 수 있습니다. 재시도 메커니즘을 사용하면 이전의 실패한 시도에서 제공된 값을 대화형으로 변경할 수 있습니다. Enter 키를 눌러 피드 생성 흐름의 옵션에 동일한 값을 재사용합니다.

샘플 출력
====================================
========== Set Properties ==========
====================================

List of Source types:
1. Amazon S3
2. Amazon SQS
3. Google Cloud Storage
4. HTTP(S) URI
5. Microsoft Azure Blob Storage
6. SFTP
7. Third party API

[Source type] Enter your choice: 7

You have selected Third party API

[Log type] Enter your choice: 6

You have selected Duo Auth

Enter feed display name: my_duo_auth_feed

======================================
=========== Input Parameters =========
======================================
(*) - Required fields.
Password/secret inputs are hidden.

(*) Username (Username to authenticate as)
=> test

(*) Secret (Secret to authenticate with)
=>

(*) API hostname (The fully qualified domain name for your instance of the API, having the form "api-xxxxxxxx.duosecurity.com")
=> test.com

Error occurred while creating feed.
Response Code: 400.
Error: generic::invalid_argument: failed to create feed for the customer (ID: ed19f037-2354-43df-bfbf-350362b45844): failed to create feed for the customer (ID: ed19f037-2354-43df-bfbf-350362b45844): failed to create feed because of the following errors in the request: generic::invalid_argument: for Duo feeds, 'hostname' must be specified as "api-xxxxxxxx.duosecurity.com", e.g. "api-eval.duosecurity.com"

$ chronicle_cli feeds create

Looks like there was a failed feed create/update attempt with source type: Third party API and log type: Duo Auth.
Would you like to retry?

======================================
=========== Input Parameters =========
======================================
(*) - Required fields.
Password/secret inputs are hidden.

(*) Username (Username to authenticate as) [test]
=>

(*) Secret (Secret to authenticate with)
=>

(*) API hostname (The fully qualified domain name for your instance of the API, having the form "api-xxxxxxxx.duosecurity.com") [test.com]
=> api-xxxxxxxx.duosecurity.com

Feed created successfully with Feed ID: 29a2f967-6f6e-4521-bebf-6fb6c7383df6

get 인수

기존 피드의 세부정보를 가져옵니다.

사용 예시
$ chronicle_cli feeds get --help
Usage: main feeds get [OPTIONS]

  Get feed details using Feed ID

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential-path TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cli/chronicle_credentials.json
  -h, --help                      Show this message and exit.

피드 세부정보를 가져오려면 피드 ID를 대화형으로 입력해야 합니다.

샘플 출력
Enter Feed ID: 72d9b843-b387-4b17-ab2d-a8497313c89c

Feed Details:
  ID: 72d9b843-b387-4b17-ab2d-a8497313c89c
  Display Name: my_duo_auth_feed
  Source type: Third party API
  Log type: Salesforce
  State: ACTIVE
  Feed Settings:
    API Hostname: myinstance.salesforce.com

list 인수

모든 피드를 나열합니다. 이 명령어는 모든 피드의 세부정보를 가져오는 데 사용됩니다.

사용 예시
$ chronicle_cli feeds list --help
Usage: chronicle_cli feeds list [OPTIONS]

List all feeds

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  --export TEXT                   Export output to specified file path.
  --file-format [TXT|CSV|JSON]    Format of the file to be exported.
  -c, --credential-path TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cli/chronicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
Feed Details:
  ID: 29259301-156b-4b60-ae91-855d15c39f6a
  Source type: Third party API
  Log type: Anomali
  State: INACTIVE
============================================================

Feed Details:
  ID: 292b7629-0250-476c-9fb2-4c8a738ce42c
  Display Name: my_duo_auth_feed
  Source type: Third party API
  Log type: Duo Auth
  State: ACTIVE
  Feed Settings:
    API hostname: api-test.duosecurity.com

============================================================

Feed Details:
  ID: 0d063a7f-34a1-4dd0-9dcf-9c7a0bb03e65
  Source type: Third party API
  Log type: Workspace Activities
  State: ACTIVE
  Feed Settings:
    Customer ID: C12abc
    Applications: ['drive', 'login']

============================================================

데이터를 내보내려면 파일 형식(CSV/TXT/JSON)과 함께 내보낼 파일의 절대/상대 경로를 지정하면 됩니다. 기본 파일 형식은 CSV입니다.

샘플 출력
Feed Details:
  ID: 29259301-156b-4b60-ae91-855d15c39f6a
  Source type: Third party API
  Log type: Anomali
  State: INACTIVE
============================================================

Feed Details:
  ID: 292b7629-0250-476c-9fb2-4c8a738ce42c
  Display Name: my_duo_auth_feed
  Source type: Third party API
  Log type: Duo Auth
  State: ACTIVE
  Feed Settings:
    API hostname: api-test.duosecurity.com

============================================================

Feed Details:
  ID: 0d063a7f-34a1-4dd0-9dcf-9c7a0bb03e65
  Source type: Third party API
  Log type: Workspace Activities
  State: ACTIVE
  Feed Settings:
    Customer ID: C12abc
    Applications: ['drive', 'login']

============================================================
Feed list details exported successfully to: /usr/local/google/home/<user>/out/chronicle-cli/output.txt

update 인수

기존 피드를 업데이트합니다.

사용 예시
$ chronicle_cli feeds update
Usage: chronicle_cli feeds update [OPTIONS]

  Update feed details using Feed ID

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential-path TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cli/chronicle_credentials.json
  -h, --help                      Show this message and exit.

명령어를 실행한 후 피드 ID와 모든 필드 값을 다시 입력합니다. Enter 키를 눌러 이전 값을 다시 사용합니다.

샘플 출력
Enter Feed ID: ea28d66b-d81b-4b4d-ae16-3b1cd98132ca
Press Enter if you don't want to update.

Enter feed display name[old_display_name]:

(*) Username (Username to authenticate as)
=> USERNAME

(*) Secret (Secret to authenticate with)
=>

(*) API hostname (The fully qualified domain name for your instance of the API, having the form "api-xxxxxxxx.duosecurity.com") [api-xxxxxxxx.duosecurity.com]
=>

Feed updated successfully with Feed ID: ea28d66b-d81b-4b4d-ae16-3b1cd98132ca
Enter Feed ID: 29a2f967-6f6e-4521-bebf-6fb6c7383df6
Press Enter if you don't want to update.

Enter feed display name[]: my_feed_display_name

(*) Username (Username to authenticate as)
=> test1

(*) Secret (Secret to authenticate with)
=>

(*) API hostname (The fully qualified domain name for your instance of the API, having the form "api-xxxxxxxx.duosecurity.com") [api-xxxxxxxx.duosecurity.com]
=> test.com

Error occurred while updating feed. Response code: 400.
Error: generic::invalid_argument: failed to update feed for the customer (ID: ed19f037-2354-43df-bfbf-350362b45844): failed to edit feed because of the following errors in the request: generic::invalid_argument: for Duo feeds, 'hostname' must be specified as "api-xxxxxxxx.duosecurity.com", e.g. "api-eval.duosecurity.com"

$ chronicle_cli feeds update
Enter Feed ID: 29a2f967-6f6e-4521-bebf-6fb6c7383df6

Looks like there was a failed feed create/update attempt with source type: Third party API and log type: Duo Auth.
Would you like to retry?

Press Enter if you don't want to update.

(*) Username (Username to authenticate as) [test1]
=>

(*) Secret (Secret to authenticate with)
=>

(*) API hostname (The fully qualified domain name for your instance of the API, having the form "api-xxxxxxxx.duosecurity.com") [test.com]
=> api-devtest.duosecurity.com

Feed updated successfully with Feed ID: 29a2f967-6f6e-4521-bebf-6fb6c7383df6

피드 업데이트가 실패하고 동일한 피드 ID를 입력하면 실패한 피드를 다시 시도하거나 프로세스를 다시 시작하라는 메시지가 표시됩니다. 실패한 피드 ID와 일치하지 않는 피드 ID를 입력하면 재시도 옵션이 표시되지 않고 피드 업데이트의 일반적인 프로세스가 계속됩니다. 재시도 메커니즘을 통해 사용자는 이전에 실패한 시도에서 제공된 옵션 값을 대화형 방식으로 변경할 수 있습니다. Enter 키를 눌러 피드 업데이트 흐름의 옵션에 동일한 값을 재사용합니다.

샘플 출력
Enter Feed ID: 51574667-dee6-408b-a5fc-0e07d3e9a429

Looks like there was a failed feed create/update attempt with source type: Third party API and log type: Duo Auth.
Would you like to retry?

Press Enter if you don't want to update.

Enter feed display name[old_display_name]:

(*) Username (Username to authenticate as) [TEEST]
=> TEST

(*) Secret (Secret to authenticate with)
=>

(*) API hostname (The fully qualified domain name for your instance of the API, having the form "api-xxxxxxxx.duosecurity.com") [asd]
=> api-xxxxxxxx.duosecurity.com

Feed updated successfully with Feed ID: 51574667-dee6-408b-a5fc-0e07d3e9a429

delete 인수

피드 ID를 사용하여 피드를 삭제하려면 이 인수를 사용합니다. 실행 시 삭제할 피드의 ID를 요청합니다.

사용 예시
$ chronicle_cli feeds delete --help
Usage: chronicle_cli feeds delete [OPTIONS]

  Delete a feed

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  -c, --credential-path TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cli/chronicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
Enter Feed ID: b0798c54-ed84-44e7-96d5-cbe208f28e49

Feed (ID: b0798c54-ed84-44e7-96d5-cbe208f28e49) deleted successfully.

enable 인수

피드를 사용 설정합니다.

사용 예시
$ chronicle_cli feeds enable --help
Usage: main feeds enable [OPTIONS]

  Enable feed for the given Feed ID

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential-path TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.

피드를 사용 설정하려면 피드 ID를 입력해야 합니다.

샘플 출력
Enter Feed ID: 29259301-156b-4b60-ae91-855d15c39f6a
Feed with ID: 29259301-156b-4b60-ae91-855d15c39f6a enabled successfully.

disable 인수

피드를 사용 중지합니다.

사용 예시
$ chronicle_cli feeds disable --help
Usage: main feeds disable [OPTIONS]

  Disable feed for the given Feed ID

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential-path TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.

피드를 사용 중지하려면 피드 ID를 입력해야 합니다.

샘플 출력
Enter Feed ID: 29259301-156b-4b60-ae91-855d15c39f6a
Feed with ID: 29259301-156b-4b60-ae91-855d15c39f6a disabled successfully.

옵션

도움말(-h / --help)

-h 또는 --help 옵션을 사용하여 명령어/옵션의 사용/설명을 확인할 수 있습니다.

사용 예시
$ chronicle_cli feeds get -h
Usage: main feeds get [OPTIONS]

  Get feed details using Feed ID

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console
  -c, --credential-path TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cli/chron
                                  icle_credentials.json
  -h, --help                      Show this message and exit.

사용자 인증 정보 경로(-c 또는 --credential-path)

이 옵션을 사용하면 인증에 사용할 서비스 계정 사용자 인증 정보의 경로를 지정할 수 있습니다. 이 옵션을 지정하지 않으면 Chronicle CLI가 기본 경로, 즉 ~/.chronicle_cli(홈 디렉터리에 있는 .chronicle_cli라는 숨겨진 디렉터리 내)에서 사용자 인증 정보를 찾습니다.

사용 예시
$ chronicle_cli feeds list --credential-path=C:\chronicle_credentials.json

세부정보(--verbose)

이 플래그를 사용하면 Chronicle CLI가 HTTP 요청 및 응답과 같은 세부정보를 콘솔에 더 자세히 출력합니다.

사용 예시
$ chronicle_cli feeds list --verbose

내보내기(--export)

이 옵션을 사용하면 list 명령어의 출력을 내보낼 파일 경로를 지정할 수 있습니다. 상대 경로와 절대 경로 모두 지원됩니다.

사용 예시
$ chronicle_cli feeds list --export=$HOME/listFeedsResponse.txt

파일 형식(--file-format)

이 옵션을 사용하면 list 명령어로 내보낸 콘텐츠의 파일 형식을 지정할 수 있습니다. 지원되는 형식은 CSV, JSON, TXT입니다. --export 옵션으로 이 옵션을 지정하지 않으면 CSV 형식이 기본값으로 사용됩니다.

사용 예시
$ chronicle_cli feeds list --export=$HOME/listFeedsResponse.txt --file-format=TXT
샘플 출력
CSV 형식
ID,Display Name,Source type,Log type,State,Feed Settings
29259301-156b-4b60-ae91-855d15c39f6a,,Third party API,Anomali,INACTIVE,
292b7629-0250-476c-9fb2-4c8a738ce42c,my_duo_auth_feed,Third party API,Duo Auth,ACTIVE,API hostname: api-xxxxxxxxabjdsfklsadlfnsafs.duosecurity.com
0d063a7f-34a1-4dd0-9dcf-9c7a0bb03e65,,Third party API,Workspace Activities,ACTIVE,"Customer ID: C12abc    Applications: ['drive', 'login']"
TXT 형식
Feed Details:
  ID: 29259301-156b-4b60-ae91-855d15c39f6a
  Source type: Third party API
  Log type: Anomali
  State: INACTIVE
============================================================

Feed Details:
  ID: 292b7629-0250-476c-9fb2-4c8a738ce42c
  Display Name: my_duo_auth_feed
  Source type: Third party API
  Log type: Duo Auth
  State: ACTIVE
  Feed Settings:
    API hostname: api-test.duosecurity.com

============================================================
JSON 형식
[
  {
    "name": "feeds/29259301-156b-4b60-ae91-855d15c39f6a",
    "details": {
      "logType": "ANOMALI_IOC",
      "feedSourceType": "API",
      "anomaliSettings": {}
    },
    "feedState": "INACTIVE"
  },
  {
    "name": "feeds/292b7629-0250-476c-9fb2-4c8a738ce42c",
    "details": {
      "logType": "DUO_AUTH",
      "feedSourceType": "API",
      "duoAuthSettings": {
        "hostname": "api-test.duosecurity.com"
      }
    },
    "feedState": "ACTIVE",
    "displayName": "my_duo_auth_feed"
  }
]

리전(--region)

명령어를 실행할 때 --region 플래그를 전달하여 리전을 선택할 수 있습니다. 기본 리전을 설정하는 방법에 대한 자세한 내용은 기본 리전 설정을 참조하세요.

문제 해결

이 섹션에서는 API 응답에서 수신된 다양한 유형의 응답 코드에 대해 콘솔에 표시되는 출력을 보여줍니다.

get 인수 응답 코드

응답 코드 콘솔 출력
404 잘못된 피드 ID입니다. 유효한 피드 ID를 입력하세요.
400 피드가 없습니다.
기타 응답 코드 피드를 가져오는 중에 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}

list 인수 응답 코드

응답 코드 콘솔 출력
200 이외의 모든 응답 코드 피드 목록을 가져오는 중에 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}
목록의 피드를 가져올 수 없습니다. 콘솔 출력 끝에서 피드 ID 및 해당 오류 메시지의 세부정보와 함께 목록이 출력됩니다.

create 인수 응답 코드

응답 코드 콘솔 출력
200 이외의 모든 응답 코드 피드 생성 중 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}

update 인수 응답 코드

응답 코드 콘솔 출력
200 이외의 모든 응답 코드 피드를 업데이트하는 중에 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}

delete 인수 응답 코드

응답 코드 콘솔 출력
404 잘못된 피드 ID입니다. 유효한 피드 ID를 입력하세요.
400 피드가 없습니다.
기타 응답 코드 피드를 삭제하는 중에 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}

enable 인수 응답 코드

응답 코드 콘솔 출력
404 잘못된 피드 ID입니다. 유효한 피드 ID를 입력하세요.
400 피드가 없습니다.
기타 응답 코드 피드를 사용 설정하는 중에 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}

disable 인수 응답 코드

응답 코드 콘솔 출력
404 잘못된 피드 ID입니다. 유효한 피드 ID를 입력하세요.
400 피드가 없습니다.
기타 응답 코드 피드를 사용 중지하는 중에 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}

기타 오류 또는 예외

예외 콘솔 출력
KeyError 응답에서 {key name} 키를 찾을 수 없습니다.
예외 예외와 함께 실패: {exception details}
사용자 인증 정보 파일 누락 예외와 함께 실패: [Errno 2] 파일 또는 디렉터리가 없음: '/usr/local/google/home//.chronicle_cli/chronicle_credentials.json'

예상 디렉터리에 사용자 인증 정보를 배치해야 합니다. 설치를 참조하세요.

파서 관리 v2 사용자 워크플로

Chronicle CLI를 사용하여 구성 기반 노멀라이저(CBN) 파서를 관리할 수 있습니다. 파서 관리 v2 CLI 명령어를 사용하는 것이 좋습니다.

명령어

parsers 명령어

parsers 명령어는 다음 인수를 사용합니다.

  • list_parsers
  • list_extensions
  • run_parser
  • submit_parser
  • submit_extension
  • delete_parser
  • delete_extension
  • deactivate_parser
  • activate_parser
  • get_parser
  • get_extension
  • get_validation_report

사용 문법:

$ chronicle_cli parsers ARGUMENT [OPTIONS]

인수

Chronicle CLI의 모든 CBN 파서 관리 워크플로는 대화형입니다. 필요한 경우 명령어 옵션을 사용할 수도 있습니다.

list_parsers 인수

모든 파서를 나열합니다.

$ chronicle_cli parsers list_parsers -h
Usage: chronicle_cli parsers list_parsers [OPTIONS] PROJECT_ID CUSTOMER_ID LOG_TYPE

  [New]List all parsers for a given customer

Options:
  -s, --state [ALL|ACTIVE|INACTIVE]
                                  Filter on Parser State.
  -f, --file-format [TXT|JSON]    Format of the file to be exported.
  --export TEXT                   Export output to specified file path.
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.
샘플 출력
Fetching list of parsers...

Parser Details:
  Parser ID: 1242538299340357633
  Log type: GCP_CLOUDAUDIT
  State: INACTIVE
  Type: CUSTOM
  Author: -
  Validation Report ID: 44684d8a-1d01-4e69-ab50-2e2d6e3ef3b2
  Create Time: 2023-07-05T05:36:31.121236Z

============================================================

Parser Details:
  Parser ID: 3840440184193679361
  Log type: GCP_CLOUDAUDIT
  State: INACTIVE
  Type: CUSTOM
  Author: -
  Validation Report ID: 3d2e1bdb-2793-48d1-a485-4f4748095cb8
  Create Time: 2023-04-14T09:15:13.718842Z

============================================================

Parser Details:
  Parser ID: 3651720008402206721
  Log type: GCP_SECURITYCENTER_ERROR
  State: ACTIVE
  Type: CUSTOM
  Author: -
  Validation Report ID: -
  Create Time: 2023-03-30T09:54:20.414510Z

============================================================

list_extensions 인수

모든 파서 확장 프로그램을 나열합니다.

$ chronicle_cli parsers list_extensions -h
Usage: chronicle_cli parsers list_extensions [OPTIONS] PROJECT_ID CUSTOMER_ID LOG_TYPE

  [New]List all extensions for a given customer

Options:
  -f, --file-format [TXT|JSON]    Format of the file to be exported.
  --export TEXT                   Export output to specified file path.
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.
샘플 출력
Fetching list of Parser Extensions...

ParserExtension Details:
  ParserExtension ID: 7b948bfb-d3f5-4922-9153-a20e75085990
  Log type: BRO_DNS
  State: VALIDATED
  Validation Report ID: 6ef30ad9-db89-4f30-80f3-0f79758ff3c2
  Create Time: 2023-07-06T03:58:26.594863Z
  State Last Changed Time: 2023-07-06T03:58:26.667151Z
  Last Live Time: 2023-07-06T03:58:28.019050Z

============================================================

ParserExtension Details:
  ParserExtension ID: 0fd9129b-d02b-42f7-912a-04b0bba0e0a7
  Log type: GCP_DNS
  State: LIVE
  Validation Report ID: 1965880f-7cd7-4943-9adf-4bff0041793d
  Create Time: 2023-05-12T08:12:17.090559Z
  State Last Changed Time: 2023-05-12T08:12:17.271615Z
  Last Live Time: 2023-05-12T08:12:27.244342Z

============================================================

ParserExtension Details:
  ParserExtension ID: d9df9d75-bb3a-4c28-b18d-69a608762ecc
  Log type: GCP_VPC_FLOW
  State: REJECTED
  Validation Report ID: c59ef2ab-4a70-4373-bdc8-067c39ca5a40
  Create Time: 2023-04-13T04:43:12.884287Z
  State Last Changed Time: 2023-04-13T04:43:13.288338Z
  Last Live Time: -

============================================================

run_parser 인수

지정된 로그에 대해 파서를 검증하려면 다음 명령어를 사용합니다.

$ chronicle_cli parsers run_parser -h
Usage: chronicle_cli parsers run_parser [OPTIONS] PROJECT_ID CUSTOMER_ID LOG_TYPE
                               PARSER_CONFIG_FILE LOG_FILE

  [New]Run a parser(with extension) against given logs

Options:
  --parserextension_config_file TEXT
                                  Path to extension config file.
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.
샘플 출력
Running parser(with extension) against given logs...

{"host_ip": "1.1.1.1"}
{'events': [{'event': {'metadata': {'eventTimestamp': '2023-06-26T08:45:10Z', 'eventType': 'GENERIC_EVENT', 'logType': 'BRO_DNS'}, 'principal': {'ip': ['1.1.1.1']}}}]}
some thing
{}

Runtime: 1.2396s

submit_parser 인수

새 파서를 제출합니다. 제출된 파서가 유효성 검사를 거치고 기존 파서가 롤백 후보로 승격됩니다.

$ chronicle_cli parsers submit_parser -h
Usage: main parsers submit_parser [OPTIONS] PROJECT_ID CUSTOMER_ID LOG_TYPE
                                  CONFIG_FILE [AUTHOR]

  [New]Submit a new parser

Options:
  --skip_validation_on_no_logs    Skip validation if no logs are found.
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.
샘플 출력
Submitting Parser...

Parser Details:
  Parser ID: 12774126091501569
  Log type: GCP_CLOUDAUDIT
  State: INACTIVE
  Type: CUSTOM
  Author: -
  Validation Report ID: -
  Create Time: 2023-07-06T13:58:10.475391Z

============================================================

submit_extension 인수

새 파서 확장 프로그램을 제출합니다. 제출된 파서 확장 프로그램은 검증을 거칩니다. 유효성 검사가 통과하면 새 파서 확장 프로그램이 생성됩니다.

$ chronicle_cli parsers submit_extension -h
Usage: chronicle_cli parsers submit_extension [OPTIONS] PROJECT_ID CUSTOMER_ID LOG_TYPE
                                     CONFIG_FILE LOG_FILE

  [New]Submit a new extension

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.
샘플 출력
Submitting Parser Extension...

ParserExtension Details:
  ParserExtension ID: 88907461-c115-4204-8391-425b7a9cfb2c
  Log type: WORKSPACE_CHROMEOS
  State: NEW
  Validation Report ID: -
  Create Time: 2023-07-06T13:58:10.475391Z
  State Last Changed Time: -
  Last Live Time: -

============================================================

delete_parser 인수

커스텀 파서를 삭제합니다. 지정된 로그 유형에 사전 빌드된 파서를 사용할 수 있습니다.

$ chronicle_cli parsers delete_parser -h
Usage: chronicle_cli parsers delete_parser [OPTIONS] PROJECT_ID CUSTOMER_ID LOG_TYPE
                                  PARSER_ID

  [New]Delete a parser

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.
샘플 출력
Deleting Parser…
Parser deleted successfully.

delete_extension 인수

커스텀 파서를 삭제합니다. 지정된 로그 유형에 사전 빌드된 파서를 사용할 수 있습니다.

$ chronicle_cli parsers delete_extension -h
Usage: chronicle_cli parsers delete_extension [OPTIONS] PROJECT_ID CUSTOMER_ID LOG_TYPE
                                     PARSEREXTENSION_ID

  [New]Delete an extension

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.
샘플 출력
Deleting Parser Extension…
ParserExtension deleted successfully.

deactivate_parser 인수

활성 커스텀 파서를 비활성화합니다. 비활성화가 성공하면 특정 로그 유형에 사전 빌드된 파서를 사용할 수 있습니다.

$ chronicle_cli parsers deactivate_parser -h
Usage: chronicle_cli parsers deactivate_parser [OPTIONS] PROJECT_ID CUSTOMER_ID
                                      LOG_TYPE PARSER_ID

  [New]Deactivate a parser

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.
샘플 출력
Deactivating Parser…
Parser deactivated successfully.

activate_parser 인수

커스텀 파서를 활성화합니다. 활성 파서를 사용할 수 있습니다.

$ chronicle_cli parsers activate_parser -h
Usage: chronicle_cli parsers activate_parser [OPTIONS] PROJECT_ID CUSTOMER_ID LOG_TYPE
                                    PARSER_ID

  [New]Activate a parser

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.
샘플 출력
Activating Parser…
Parser activated successfully.

get_parser 인수

지정된 파서 ID 및 로그 유형의 세부정보를 가져옵니다.

$ chronicle_cli parsers get_parser -h
Usage: chronicle_cli parsers get_parser [OPTIONS] PROJECT_ID CUSTOMER_ID LOG_TYPE
                               PARSER_ID

  [New]Get details of a parser

Options:
  -f, --file-format [TXT|JSON]    Format of the file to be exported.
  --export TEXT                   Export output to specified file path.
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.
샘플 출력
Fetching Parser details...

Parser Details:
  Parser ID: 3840440184193679361
  Log type: GCP_CLOUDAUDIT
  State: INACTIVE
  Type: CUSTOM
  Author: -
  Validation Report ID: 3d2e1bdb-2793-48d1-a485-4f4748095cb8
  Create Time: 2023-04-14T09:15:13.718842Z

============================================================

get_extension 인수

지정된 파서 ID 및 로그 유형의 구성을 가져옵니다.

$ chronicle_cli parsers get_extension -h
Usage: chronicle_cli parsers get_extension [OPTIONS] PROJECT_ID CUSTOMER_ID LOG_TYPE
                                  PARSEREXTENSION_ID

  [New]Get details of an extension

Options:
  -f, --file-format [TXT|JSON]    Format of the file to be exported.
  --export TEXT                   Export output to specified file path.
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.

샘플 출력
Fetching Parser Extension details...

ParserExtension Details:
  ParserExtension ID: 7b948bfb-d3f5-4922-9153-a20e75085990
  Log type: BRO_DNS
  State: VALIDATED
  Validation Report ID: 6ef30ad9-db89-4f30-80f3-0f79758ff3c2
  Create Time: 2023-07-06T03:58:26.594863Z
  State Last Changed Time: 2023-07-06T03:58:26.667151Z
  Last Live Time: 2023-07-06T03:58:28.019050Z

============================================================

get_validation_report 인수

파서 또는 확장 프로그램에 대해 검증 보고서를 가져옵니다.

$ chronicle_cli parsers get_validation_report [OPTIONS] PROJECT_ID CUSTOMER_ID
                                          LOG_TYPE VALIDATION_REPORT_ID

  [New]Get validation report for a parser/extension

Options:
  --parser_id TEXT                ID of the parser.
  --parserextension_id TEXT       ID of the parser extension.
  --env [prod|test]               Optional: Specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select a region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.
샘플 출력
Fetching Validation report for ParserExtension...

Validation Report:
  Verdict: PASS
  Stats:
    LogEntry Count: 10000
    Successfully Normalized Log Count: 10000
    Failed Log Count: 0
    Invalid Log Count: 0
    On Error Count: 153938
    Event Count: 10000
    Generic Event Count: 0
    Event Category:
      Valid_event: 10000
    Drop Tag:
      -
    Max Parse Duration: 0.274677769s
    Avg Parse Duration: 0.010s
    Normalization percent: 100
    Generic Event percent: 0
  Errors: -
  

옵션

도움말(-h / --help)

모든 명령어에 대한 설명과 함께 사용량을 보려면 -h 또는 --help 옵션을 사용합니다.

사용 예시:
$ chronicle_cli parsers list_parsers -h
Usage: chronicle_cli parsers list_parsers [OPTIONS] PROJECT_ID CUSTOMER_ID LOG_TYPE

  [New]List all parsers for a given customer

Options:
  -s, --state [ALL|ACTIVE|INACTIVE]
                                  Filter on Parser State.
  -f, --file-format [TXT|JSON]    Format of the file to be exported.
  --export TEXT                   Export output to specified file path.
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli
                                  /chronicle_credentials.json
  --v2                            Enable v2 commands.
  -h, --help                      Show this message and exit.

환경(--env)

명령어에 --env 플래그를 전달하여 환경을 선택하면 API 호출이 그에 따라 실행됩니다. 환경 값은 prod, test에서 선택할 수 있습니다. 이 옵션을 지정하지 않으면 기본값은 prod로 설정됩니다.

사용자 인증 정보 파일(-c 또는 --credential_file)

이 옵션을 사용하면 인증에 사용할 서비스 계정 사용자 인증 정보의 경로를 지정할 수 있습니다. 이 옵션을 지정하지 않으면 Chronicle CLI가 기본 경로, 즉 ~/.chronicle_cli(홈 디렉터리에 있는 .chronicle_cli라는 숨겨진 디렉터리 내)에서 사용자 인증 정보를 찾습니다.

사용 예시:
$ chronicle_cli parsers list_parsers --credential_file=C:\chronicle_credentials.json

리전(--region)

명령어를 실행할 때 --region 플래그를 전달하여 리전을 선택할 수 있습니다. 기본 리전을 설정하는 방법에 대한 자세한 내용은 기본 리전 설정을 참조하세요.

세부정보(--verbose)

이 옵션을 사용하면 수신된 HTTP 요청과 수신된 응답의 세부정보를 출력할 수 있습니다.

사용 예시:
$ chronicle_cli parsers list_parsers --verbose

내보내기(--export)

이 옵션을 사용하면 list 또는 list_errors 명령어의 출력을 내보낼 파일 경로를 지정할 수 있습니다. 상대 경로와 절대 경로 모두 지원됩니다.

사용 예시:
$ chronicle_cli parsers list_parsers --export=parser_list

파일 형식(--file-format)

이 옵션을 사용하면 list 또는 list_errors 명령어로 내보낸 콘텐츠의 파일 형식을 지정할 수 있습니다. JSONTXT의 두 가지 형식이 지원됩니다. --export 옵션으로 이 옵션을 지정하지 않으면 TXT 형식이 기본값으로 사용됩니다.

사용 예시:
$ chronicle_cli parsers list_parsers --export=parser_list --file-format=JSON

파서 관리 사용자 워크플로

Chronicle CLI는 다음 명령어를 사용하여 CBN 파서를 관리할 수 있습니다. 하지만 파서 관리 v2 CLI 명령어를 사용하는 것이 좋습니다.

명령어

parsers 명령어

parsers 명령어는 다음 인수를 사용합니다.

  • archive
  • download
  • generate
  • history
  • list
  • list_errors
  • run
  • status
  • submit

사용 문법:

$ chronicle_cli parsers ARGUMENT [OPTIONS]

인수

Chronicle CLI의 모든 CBN 파서 관리 워크플로는 대화형입니다. 명령어에 필요할 때 옵션을 선택하라는 메시지가 표시됩니다.

list 인수

모든 파서의 세부정보를 나열하려면 다음 명령어를 사용합니다.

$ chronicle_cli parsers list -h
Usage: main parsers list [OPTIONS]

  List all parsers of a given customer

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --export TEXT                   Export output to specified file path.
  --file-format [TXT|CSV|JSON]    Format of the file to be exported.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
Fetching list of parsers...

Parser Details:
  Config ID: 1cb402d9-eab2-4f6b-b402-20b1211675ed
  Log type: WINDOWS_SYSMON
  State: LIVE
  SHA256: 7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7
  Author: <user>@test.com
  Submit Time: 2022-08-26T09:57:10.644351Z
  State Last Changed Time: 2022-08-26T09:58:23.809636Z
  Last Live Time: 2022-08-26T09:58:23.809636Z
============================================================

Parser Details:
  Config ID: 7f2ae1f5-8f0c-43f9-bb02-299e7c8b9e82
  Log type: BOX
  State: LIVE
  SHA256: 8xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7
  Author: <user>@test.com
  Submit Time: 2022-08-25T07:33:31.026399Z
  State Last Changed Time: 2022-08-25T07:33:32.263754Z
  Last Live Time: 2022-08-25T07:33:32.263754Z
============================================================

generate 인수

특정 로그 유형의 샘플 로그를 생성하려면 다음 명령어를 사용합니다.

$ chronicle_cli parsers generate -h
Usage: main parsers generate [OPTIONS]

  Generate sample logs for a given log type

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.

이 명령어는 <root>/chronicle_cli/cbn/<log_type>/ 아래의 루트 디렉터리에 1, 10, 1,000개의 샘플 로그가 있는 3개의 파일을 만듭니다.

샘플 출력
Enter Start Date (Format: yyyy-mm-ddThh:mm:ssZ): 2022-08-17T10:00:00Z
Enter End Date (Format: yyyy-mm-ddThh:mm:ssZ): 2022-08-23T10:00:00Z
Enter Log Type: WINDOWS_DHCP

Generating sample size: 1...
Generating sample size: 10...
Generating sample size: 1k...
Generated sample data (WINDOWS_DHCP); run this to go there:
cd /usr/local/home/<user>/cbn/windows_dhcp

history 인수

특정 로그 유형의 모든 파서 제출 세부정보 목록을 가져오려면 다음 명령어를 사용합니다.

$ chronicle_cli parsers history -h
Usage: main parsers history [OPTIONS]

  History retrieves all parsers submissions given a log type

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
Enter Log Type: WINDOWS_SYSMON
Fetching history for parser...

Parser History:
  Config ID: 8d9f5b1c-4689-4ca3-ae9b-863ce78dd123
  Log type: WINDOWS_SYSMON
  State: LIVE
  SHA256: 7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7
  Author: author@test.com
  Submit Time: 2022-08-26T12:37:55.187407Z
  State Last Changed Time: 2022-08-26T12:39:12.198587Z
  Last Live Time: 2022-08-26T12:39:12.198587Z

============================================================

Parser History:
  Config ID: 29bbf14b-2ffb-411a-bb37-911b13437123
  Log type: WINDOWS_SYSMON
  State: ARCHIVED
  SHA256: 8xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7
  Author: author@test.com
  Submit Time: 2022-08-26T12:05:34.421743Z
  State Last Changed Time: 2022-08-26T12:39:12.198587Z
  Last Live Time: 2022-08-26T12:06:55.495269Z

============================================================

list_errors 인수

특정 타임스탬프 사이의 로그 유형 오류를 나열하려면 다음 명령어를 사용합니다.

$ chronicle_cli parsers list_errors -h
Usage: main parsers list_errors [OPTIONS]

  List errors of a log type between specific timestamps

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --export TEXT                   Export output to specified file path.
  --file-format [TXT|CSV|JSON]    Format of the file to be exported.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
Enter Log Type: CISCO_ASA_FIREWALL
Enter Start Date (Format: yyyy-mm-ddThh:mm:ssZ): 2021-01-16T00:00:00Z
Enter End Date (Format: yyyy-mm-ddThh:mm:ssZ): 2022-08-21T12:00:00Z
Getting parser errors...
Error Details:
  Error ID: f9eb72cb-f320-dd5a-a098-00bcaa76a35d
  Config ID: N/A
  Log type: CISCO_ASA_FIREWALL
  Error Time: 2022-08-18T10:57:56.898883208Z
  Error Category: CBN_parsers_GENERATED_INVALID_EVENT
  Error Message: generic::invalid_argument: diff event timestamp ("seconds:1630106465") and create timestamp ("seconds:1660820265 nanos:202151000"): 8531h36m40.202151s, larger than allowed (4320h0m0s)
  Logs:
      <190>Aug 27 2020 23:21:05 TEST : %ASA-6-106012: Deny IP from 1.2.3.4 to 5.6.7.8, IP options: Test user
============================================================

Error Details:
  Error ID: f9eb72cb-f320-dd5a-a098-00bcaa76a35d
  Config ID: N/A
  Log type: CISCO_ASA_FIREWALL
  Error Time: 2022-08-18T10:57:56.898883208Z
  Error Category: CBN_parsers_GENERATED_INVALID_EVENT
  Error Message: generic::invalid_argument: diff event timestamp ("seconds:1630106465") and create timestamp ("seconds:1660820265 nanos:202151000"): 8531h36m40.202151s, larger than allowed (4320h0m0s)
  Logs:
      <190>Aug 27 2020 23:21:05 TEST : %ASA-6-106012: Deny IP from 1.2.3.4 to 5.6.7.8, IP options: Demo user

run 인수

지정된 로그에 대해 파서를 검증하려면 다음 명령어를 사용합니다.

$ chronicle_cli parsers run -h
Usage: main parsers run [OPTIONS]

  Run the parser against given logs

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
Enter path for conf file: /usr/local/home/Desktop/windows_sysmon.conf
Enter path for log file: /usr/local/home/Desktop/windows_sysmon.log
Running Validation…
Runtime: 2.4914s

submit 인수

새 파서를 제출하려면 다음 명령어를 사용하세요.

$ chronicle_cli parsers submit -h
Usage: main parsers submit [OPTIONS]

  Submit new parser

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
Enter Log type: CISCO_ASA_FIREWALL
Enter Config file path: /usr/local/Desktop/windows_sysmon.conf
Enter author: test
Submitting parser...

Submitted Parser Details:
  Config ID: 9ba20930-9733-4fcd-badf-18fedb9f8123
  Log type: CISCO_ASA_FIREWALL
  State: NEW
  SHA256: 7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7
  Author: test
  Submit Time: 2022-08-30T06:49:54.005119Z
  State Last Changed Time: 2022-08-30T06:49:54.005119Z

Parser submitted successfully. To get status of the parser, run this command using following Config ID - 9ba20930-9733-4fcd-badf-18fedb9f8123:
chronicle_cli parsers status

status 인수

제출된 파서 상태를 가져오려면 다음 명령어를 사용합니다.

$ chronicle_cli parsers status -h
Usage: main parsers status [OPTIONS]

  Get status of a submitted parser

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
Enter Config ID: 1cb402d9-eab2-4f6b-b402-20b1211675ed

Getting parser...

Parser Details:
  Config ID: 1cb402d9-eab2-4f6b-b402-20b1211675ed
  Log type: WINDOWS_SYSMON
  State: ARCHIVED
  SHA256: 79ac67c15ffb047a152be2fb2a3391cbe18b2d183e9e6a402eb2fe53a6666b17
  Author: test
  Submit Time: 2022-08-26T09:57:10.644351Z
  State Last Changed Time: 2022-08-26T09:58:23.809636Z
  Last Live Time: 2022-08-26T09:58:23.809636Z

archive 인수

기존 파서를 보관처리하려면 다음 명령어를 사용합니다.

$ chronicle_cli parsers archive -h
Usage: main parsers archive [OPTIONS]

  Archives a parser given the config ID.

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
Enter Config ID: 1cb402d9-eab2-4f6b-b402-20b121167123
Archiving parser...

Parser archived Successfully.

Parser Details:
  Config ID: 1cb402d9-eab2-4f6b-b402-20b121167123
  Log type: WINDOWS_SYSMON
  State: ARCHIVED
  SHA256: 7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7
  Author: test
  Submit Time: 2022-08-26T09:57:10.644351Z
  State Last Changed Time: 2022-08-26T09:58:23.809636Z
  Last Live Time: 2022-08-26T09:58:23.809636Z

download 인수

특정 로그 유형 또는 구성 ID의 구성(.conf) 파일을 다운로드하려면 다음 명령어를 사용합니다.

$ chronicle_cli parsers download -h
Usage: main parsers download [OPTIONS]

  Download parser code by given Config ID or Log type.

Options:
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
  • 구성 ID 사용
Note: If you want to download parser by log type then skip the config ID.
Enter config ID: 9d1474ab-eff2-4855-ba57-4f0c458e3ac2
Downloading parser...
Writing parser to: CISCO_ASA_FIREWALL_20220825131911.conf
  • 로그 유형 사용
Note: If you want to download parser by log type then skip the config ID.
Enter config ID:
Enter Log Type: CISCO_ASA_FIREWALL
Downloading parser...
Writing parser to: CISCO_ASA_FIREWALL_20220825132011.conf

옵션

도움말(-h / --help)

모든 명령어에 대한 설명과 함께 사용량을 보려면 -h 또는 --help 옵션을 사용합니다.

사용 예시:
$ chronicle_cli parsers list -h
Usage: main parsers list [OPTIONS]

  List all parsers of a given customer

Options:
  -f, --file-format [TXT|JSON]    Format of the file to be exported.
  --export TEXT                   Export output to specified file path.
  --env [prod|test]               Optionally specify the environment for API
                                  calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/home/<user>/.chronicle_cli/chro
                                  nicle_credentials.json
  -h, --help                      Show this message and exit.

환경(--env)

명령어에 --env 플래그를 전달하여 환경을 선택하면 API 호출이 그에 따라 실행됩니다. 환경 값은 prod, test에서 선택할 수 있습니다. 이 옵션을 지정하지 않으면 기본값은 prod로 설정됩니다.

사용자 인증 정보 파일(-c 또는 --credential_file)

이 옵션을 사용하면 사용자 인증에 사용할 서비스 계정 사용자 인증 정보의 경로를 지정할 수 있습니다. 이 옵션을 지정하지 않으면 Chronicle CLI가 기본 경로, 즉 ~/.chronicle_cli(홈 디렉터리에 있는 .chronicle_cli라는 숨겨진 디렉터리 내)에서 사용자 인증 정보를 찾습니다.

사용 예시:
$ chronicle_cli parsers list --credential_file=C:\chronicle_credentials.json

리전(--region)

명령어를 실행할 때 --region 플래그를 전달하여 리전을 선택할 수 있습니다. 기본 리전을 설정하는 방법에 대한 자세한 내용은 기본 리전 설정을 참조하세요.

세부정보(--verbose)

이 옵션을 사용하면 수신된 HTTP 요청과 수신된 응답의 세부정보를 출력할 수 있습니다.

사용 예시:
$ chronicle_cli parsers list --verbose

내보내기(--export)

이 옵션을 사용하면 list 또는 list_errors 명령어의 출력을 내보낼 파일 경로를 지정할 수 있습니다. 상대 경로와 절대 경로 모두 지원됩니다.

사용 예시:
$ chronicle_cli parsers list --export=parsers_list

파일 형식(--file-format)

이 옵션을 사용하면 list 또는 list_errors 명령어로 내보낸 콘텐츠의 파일 형식을 지정할 수 있습니다. 세 가지 형식이 지원됩니다(JSON, TXT). --export 옵션으로 이 옵션을 지정하지 않으면 TXT 형식이 기본값으로 사용됩니다.

사용 예시:
$ chronicle_cli parsers list --export=parsers_list --file-format=JSON

문제 해결

CBN 파서 관리 오류 코드

이 섹션에서는 API 응답에서 수신된 다양한 응답 코드 유형에 대해 콘솔에 표시되는 출력을 보여줍니다.

각 명령어의 출력을 보려면 아래 표를 참조하세요.

응답 코드 명령어 콘솔 출력
200 이외의 모든 응답 코드 {command}[archive, download, generate, history, list_errors, run, status, list, submit] {command} 파서 중에 오류가 발생했습니다.
응답 코드: {status code}
오류: {error message}

전달자 관리 사용자 워크플로

다음 명령어를 사용하여 전달자 및 연결된 수집기를 관리하는 데 Chronicle CLI를 사용할 수 있습니다.

명령어

forwarders 명령어

forwarders 명령어는 다음 인수를 사용합니다.

  • create
  • update
  • get
  • list
  • delete
  • generate_files
  • collectors

사용 문법:

$ chronicle_cli forwarders ARGUMENT [OPTIONS]

collectors 명령어

collectors 명령어는 다음 인수를 사용합니다.

  • create
  • update
  • get
  • list
  • delete

사용 문법:

$ chronicle_cli forwarders collectors ARGUMENT [OPTIONS]

인수

Chronicle CLI의 모든 전달자 관리 워크플로는 대화형입니다. 필요에 따라 옵션을 선택하라는 메시지가 표시됩니다.

create 인수

새 전달자를 만들고 수집기를 구성하려면 다음 명령어를 사용합니다.

$ chronicle_cli forwarders create --help
Usage: main forwarders create [OPTIONS]

  Create a Forwarder

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
$ chronicle_cli forwarders create
================================================================================
Press Enter if you want to use the default value mentioned besides field description in [] brackets.
================================================================================

(*) Forwarder Display Name : test_display_name

========================================
======== Forwarder Configuration =======
========================================

Upload Compression (Determines if uploaded data will be compressed) [Y/n]: y

Do you want to proceed with Forwarder Metadata? [y/N]: y

========================================
========== Forwarder Metadata ==========
========================================

Asset Namespace: test_namespace

========================================
=========== Forwarder Labels ===========
========================================

Labels (The ingestion metadata labels in 'key:value' format to apply to all logs ingested through this forwarder, as well as the resulting normalized data.)
Enter/Paste your content. On a new line, press Ctrl-D (Linux) / [Ctrl-Z + Enter (Windows)] to save it:
key1:value1
key2:value2

Do you want to proceed with Forwarder Regex Filters? [y/N]: y

========================================
======= Forwarder Regex Filters =======
========================================

Filter Description (Describes what is being filtered and why): desc1

Filter Regexp (The regular expression used to match against each incoming line): .*

Filter Behavior (Filter behavior to apply when a match is found)
Choose:
1. allow
2. block
: 1

You have selected allow

Do you want to add more Forwarder Regex Filters [y/N]: y

Filter Description (Describes what is being filtered and why): desc2

Filter Regexp (The regular expression used to match against each incoming line): .*

Filter Behavior (Filter behavior to apply when a match is found)
Choose:
1. allow
2. block
: 2

You have selected block

Do you want to add more Forwarder Regex Filters [y/N]: n

Do you want to proceed with Server Settings? [y/N]: y

========================================
=========== Server Settings ===========
========================================

Server State (Server State for Collector)
Choose:
1. active
2. suspended
: 1

You have selected active

Graceful Timeout (Number of seconds after which the forwarder returns a bad readiness/health check and still accepts new connections) [15]:

Drain timeout (Number of seconds after which the forwarder waits for active connections to successfully close on their own before being closed by the server) [10]:

Do you want to proceed with HTTP-specific server settings? [y/N]: y

========================================
==== HTTP-specific server settings ====
========================================

Host (IP address, or hostname that can be resolved to IP addresses, that the server should listen on) [0.0.0.0]: 10.0.14.132

Port (Port number that the HTTP server listens on for health checks from the load balancer) [8080]: 8000

Read Timeout (Maximum amount of time allowed to read the entire request, both the header and the body) [3]:

Read Header Timeout (Maximum amount of time allowed to read request headers) [3]:

Write Timeout (Maximum amount of time allowed to send a response) [3]:

Idle Timeout (Maximum amount of time (in seconds) to wait for the next request when idle connections are enabled) [3]:

Do you want to proceed with Route Settings? [y/N]: y

========================================
============ Route Settings ============
========================================

Available Status Code (Status code returned when a liveness check is received and the forwarder is available) [204]: 200

Ready Status Code (Status code returned when it is ready to accept traffic) [204]: 200

Unready Status Code (Status code returned when it is not ready to accept traffic) [503]: 500

Preview changes:

  - Press Up/b or Down/z keys to paginate.
  - To switch case-sensitivity, press '-i' and press enter. By default, search
    is case-sensitive.
  - To search for specific field, press '/' key, enter text and press enter.
  - Press 'q' to quit and confirm preview changes.
  - Press `h` for all the available options to navigate the list.
=============================================================================

Config:
  Metadata:
    Asset namespace: test_namespace
    Labels:
    - key: key1
      value: value1
    - key: key2
      value: value2
  Regex filters:
  - behavior: ALLOW
    description: desc1
    regexp: .*
  - behavior: BLOCK
    description: desc2
    regexp: .*
  Server settings:
    Drain timeout: 10
    Graceful timeout: 15
    Http settings:
      Host: 10.0.14.132
      Idle timeout: 3
      Port: 8000
      Read header timeout: 3
      Read timeout: 3

Do you want to create forwarder with this configuration [y/N]: y

Creating forwarder...
Forwarder created successfully with Forwarder ID: a7e59660-959b-44e7-aa7e-baec820d01f4

Would you like to configure collectors for this forwarder? [y/N]: y

(*) Collector Display Name: collector_1

========================================
======== Collector Configuration ======
========================================

(*) Collector Log Type (Type of logs collected): WINDOWS_DNS

Do you want to proceed with Collector Metadata? [y/N]: y

========================================
========== Collector Metadata ==========
========================================

Asset Namespace: test_namespace

========================================
=========== Forwarder Labels ===========
========================================

Labels (The ingestion metadata labels in 'key:value' format to apply to all logs ingested through this forwarder, as well as the resulting normalized data.)
Enter/Paste your content. On a new line, press Ctrl-D (Linux) / [Ctrl-Z + Enter (Windows)] to save it:
key1:value1
key2:value2

Do you want to proceed with Collector Regex Filters? [y/N]: y

========================================
======= Collector Regex Filters =======
========================================

Filter Description (Describes what is being filtered and why): desc1

Filter Regexp (The regular expression used to match against each incoming line): .*

Filter Behavior (Filter behavior to apply when a match is found)
Choose:
1. allow
2. block
: 1

You have selected allow

Do you want to add more Collector Regex Filters [y/N]: n

Do you want to proceed with Collector Disk Buffer? [y/N]: y

========================================
======== Collector Disk Buffer ========
========================================

Disk Buffer State (Disk buffering state for collector)
Choose:
1. active
2. suspended
: 1

You have selected active

Directory Path (Directory path for files written): path/to/file.txt

Max File Buffer Bytes (Maximum buffered file size): 45

Maximum Seconds per Batch (Maximum number of seconds between forwarder batch uploads) [10]:

Maximum Bytes per Batch (Maximum number of bytes queued before forwarder batch upload) [1048576]:

========================================
===== Configure Ingestion Settings =====
========================================

Choose:
1. File Settings
2. Kafka Settings
3. Pcap Settings
4. Splunk Settings
5. Syslog Settings
: 1

File Path (Path of file to monitor): path/to/file.txt

Preview changes:

  - Press Up/b or Down/z keys to paginate.
  - To switch case-sensitivity, press '-i' and press enter. By default, search
    is case-sensitive.
  - To search for specific field, press '/' key, enter text and press enter.
  - Press 'q' to quit and confirm preview changes.
  - Press `h` for all the available options to navigate the list.
=============================================================================

Config:
  Disk buffer:
    Directory path: path/to/file.txt
    Max file buffer bytes: 45
    State: ACTIVE
  File settings:
    File path: path/to/file.txt
  Log type: WINDOWS_DNS
  Max bytes per batch: 1048576
  Max seconds per batch: 10
  Metadata:
    Asset namespace: test_namespace
    Labels:
    - key: key1
      value: value1
    - key: key2
      value: value2
  Regex filters:
    Behavior: ALLOW
    Description: desc1
    Regexp: .*
Display name: collector_1

Do you want to create collector with this configuration [y/N]: y

Creating collector...
Collector created successfully with Collector ID: 1f72f9ab-3ae3-4c5f-955e-86c982587937

Would you like to add more collectors? [y/N]: n

전달자 만들기가 실패하고 동일한 전달자 ID를 입력하면 실패한 전달자를 다시 시도하거나 프로세스를 다시 시작하라는 메시지가 표시됩니다. 입력한 전달자 ID가 실패한 전달자 ID와 일치하지 않으면 재시도하라는 메시지가 표시되지 않고 전달자 생성 프로세스가 계속됩니다.

샘플 출력
...
Creating forwarder...

Error occurred while creating forwarder.
Response Code: 500.
Error: ZERO_APP::1: create forwarder due to validation errors in request: generic::invalid_argument: filter's description is not specified

$ chronicle_cli forwarders create

Looks like there was a failed create/update attempt for test.
Would you like to retry?

(*) Forwarder Display Name [test]:

Do you want to create forwarder with this configuration [y/N]: y

Creating forwarder...
Forwarder created successfully with Forwarder ID: ab7af569-d957-44a3-99a8-aa70ffdc6458

Would you like to configure collectors for this forwarder? [y/N]: n

get 인수

기존 전달자 및 각 수집기의 세부정보를 가져오려면 다음 명령어를 사용합니다.

$ chronicle_cli forwarders get --help
Usage: main forwarders get [OPTIONS]

  Get forwarder details using Forwarder ID

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력

전달자 세부정보를 가져오려면 전달자 ID를 입력해야 합니다.

$ chronicle_cli forwarders get
Enter Forwarder ID: a7e59660-959b-44e7-aa7e-baec820d01f4

Fetching forwarder and its all associated collectors...

Forwarder Details:

ID: a7e59660-959b-44e7-aa7e-baec820d01f4
Display name: test_display_name
State: ACTIVE
Config:
  Upload compression: true
  Metadata:
    Asset namespace: test_namespace
    Labels:
    - key: key1
      value: value1
    - key: key2
      value: value2
  Regex filters:
  - description: desc1
    regexp: .*
    behavior: ALLOW
  - description: desc2
    regexp: .*
    behavior: BLOCK
  Server settings:
    Graceful timeout: 15
    Drain timeout: 10
    Http settings:
      Port: 8000
      Host: 10.0.14.132
      Read timeout: 3
      Read header timeout: 3
      Write timeout: 3
      Idle timeout: 3
      Route settings:
        Available status code: 200
        Ready status code: 200
        Unready status code: 500
    State: ACTIVE

Collectors:
  Collector [1f72f9ab-3ae3-4c5f-955e-86c982587937]:
    Display name: collector_1
    State: ACTIVE
    Config:
      Log type: WINDOWS_DNS
      Metadata:
        Asset namespace: test_namespace
        Labels:
        - key: key1
          value: value1
        - key: key2
          value: value2
      Regex filters:
      - description: desc1
        regexp: .*
        behavior: ALLOW
      Disk buffer:
        State: ACTIVE
        Directory path: path/to/file.txt
        Max file buffer bytes: '45'
      Max seconds per batch: 10
      Max bytes per batch: '1048576'
      File settings:
        File path: path/to/file.txt

================================================================================

list 인수

모든 전달자 및 각 수집기 목록을 표시하려면 다음 명령어를 사용합니다.

$ chronicle_cli forwarders list --help
Usage: main forwarders list [OPTIONS]

  List all forwarders

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  --export TEXT                   Export output to specified file path
  --file-format [TXT|CSV|JSON]    Format of the file to be exported
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -h, --help                      Show this message and exit.

명령어는 모든 전달자 및 수집기의 세부정보를 가져오는 데 사용됩니다.

샘플 출력
$ chronicle_cli forwarders list
Fetching list of forwarders...

Forwarder Details:

ID: a7e59660-959b-44e7-aa7e-baec820d01f4
Display name: test_display_name
State: ACTIVE
Config:
  Upload compression: true
  Metadata:
    Asset namespace: test_namespace
    Labels:
    - key: key1
      value: value1
    - key: key2
      value: value2
  Regex filters:
  - description: desc1
    regexp: .*
    behavior: ALLOW
  - description: desc2
    regexp: .*
    behavior: BLOCK
  Server settings:
    Graceful timeout: 15
    Drain timeout: 10
    Http settings:
      Port: 8000
      Host: 10.0.14.132
      Read timeout: 3
      Read header timeout: 3
      Write timeout: 3
      Idle timeout: 3
      Route settings:
        Available status code: 200
        Ready status code: 200
        Unready status code: 500
    State: ACTIVE

Collectors:
  Collector [1f72f9ab-3ae3-4c5f-955e-86c982587937]:
    Display name: collector_1
    State: ACTIVE
    Config:
      Log type: WINDOWS_DNS
      Metadata:
        Asset namespace: test_namespace
        Labels:
        - key: key1
          value: value1
        - key: key2
          value: value2
      Regex filters:
      - description: desc1
        regexp: .*
        behavior: ALLOW
      Disk buffer:
        State: ACTIVE
        Directory path: path/to/file.txt
        Max file buffer bytes: '45'
      Max seconds per batch: 10
      Max bytes per batch: '1048576'
      File settings:
        File path: path/to/file.txt

================================================================================

Forwarder Details:

ID: ddcca884-cdc6-4ac2-ad30-05a28e6cf35a
Display name: test
State: ACTIVE
Config:
  Upload compression: true
  Metadata:
    Asset namespace: test
    Labels:
    - key: k1
      value: v2
  Regex filters:
  - description: hh
    regexp: hh
    behavior: ALLOW
  - description: gg
    regexp: gg
    behavior: BLOCK
  Server settings:
    Graceful timeout: 15
    Drain timeout: 10
    Http settings:
      Port: 8080
      Host: 0.0.0.0
      Read timeout: 3
      Read header timeout: 3
      Write timeout: 3
      Idle timeout: 3
      Route settings:
        Available status code: 204
        Ready status code: 204
        Unready status code: 503
    State: ACTIVE

Collectors:
  Message: No collectors found for this forwarder.

================================================================================

데이터를 내보내려면 파일 형식(CSV/TXT/JSON)과 함께 내보낼 파일의 절대/상대 경로를 지정하면 됩니다. 기본 파일 형식은 CSV입니다.

샘플 출력
$ chronicle_cli forwarders list --export=$HOME/listforwarder --file-format=JSON
Fetching list of forwarders...

Forwarder Details:

ID: a7e59660-959b-44e7-aa7e-baec820d01f4
Display name: test_display_name
State: ACTIVE
Config:
  Upload compression: true
  Metadata:
    Asset namespace: test_namespace
    Labels:
    - key: key1
      value: value1
    - key: key2
      value: value2
  Regex filters:
  - description: desc1
    regexp: .*
    behavior: ALLOW
  - description: desc2
    regexp: .*
    behavior: BLOCK
  Server settings:
    Graceful timeout: 15
    Drain timeout: 10
    Http settings:
      Port: 8000
      Host: 10.0.14.132
      Read timeout: 3
      Read header timeout: 3
      Write timeout: 3
      Idle timeout: 3
      Route settings:
        Available status code: 200
        Ready status code: 200
        Unready status code: 500
    State: ACTIVE

Collectors:
  Collector [1f72f9ab-3ae3-4c5f-955e-86c982587937]:
    Display name: collector_1
    State: ACTIVE
    Config:
      Log type: WINDOWS_DNS
      Metadata:
        Asset namespace: test_namespace
        Labels:
        - key: key1
          value: value1
        - key: key2
          value: value2
      Regex filters:
      - description: desc1
        regexp: .*
        behavior: ALLOW
      Disk buffer:
        State: ACTIVE
        Directory path: path/to/file.txt
        Max file buffer bytes: '45'
      Max seconds per batch: 10
      Max bytes per batch: '1048576'
      File settings:
        File path: path/to/file.txt

================================================================================

Forwarder Details:

ID: ddcca884-cdc6-4ac2-ad30-05a28e6cf35a
Display name: test
State: ACTIVE
Config:
  Upload compression: true
  Metadata:
    Asset namespace: test
    Labels:
    - key: k1
      value: v2
  Regex filters:
  - description: hh
    regexp: hh
    behavior: ALLOW
  - description: gg
    regexp: gg
    behavior: BLOCK
  Server settings:
    Graceful timeout: 15
    Drain timeout: 10
    Http settings:
      Port: 8080
      Host: 0.0.0.0
      Read timeout: 3
      Read header timeout: 3
      Write timeout: 3
      Idle timeout: 3
      Route settings:
        Available status code: 204
        Ready status code: 204
        Unready status code: 503
    State: ACTIVE

Collectors:
  Message: No collectors found for this forwarder.

================================================================================
Forwarders list details exported successfully to: /usr/local/google/home/<user>/listforwarder.json

update 인수

기존 전달자를 업데이트하려면 다음 명령어를 사용합니다.

$ chronicle_cli forwarders update --help
Usage: main forwarders update [OPTIONS]

  Update a forwarder using forwarder ID.

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -h, --help                      Show this message and exit.

명령어를 실행한 후 전달자 ID와 모든 필드 값을 다시 입력합니다. Enter 키를 누르면 이전 값을 재사용할 수 있습니다.

샘플 출력
$ chronicle_cli forwarders update
Enter Forwarder ID: a7e59660-959b-44e7-aa7e-baec820d01f4
Press Enter if you don't want to update.

(*) Forwarder Display Name [test_display_name]:

========================================
======== Forwarder Configuration =======
========================================

Upload Compression (Determines if uploaded data will be compressed) [Y/n]: y

Do you want to proceed with Forwarder Metadata? [y/N]: y

========================================
========== Forwarder Metadata ==========
========================================

Asset Namespace [test_namespace]:

========================================
=========== Forwarder Labels ===========
========================================

Labels (The ingestion metadata labels in 'key:value' format to apply to all logs ingested through this forwarder, as well as the resulting normalized data.)
Enter/Paste your content. On a new line, press Ctrl-D (Linux) / [Ctrl-Z + Enter (Windows)] to save it:
[[{'key': 'key1', 'value': 'value1'}, {'key': 'key2', 'value': 'value2'}]]

Do you want to proceed with Forwarder Regex Filters? [y/N]: n

Do you want to proceed with Server Settings? [y/N]: n

Do you want to update forwarder with this configuration? [y/N]: y

Updating forwarder...

Forwarder updated successfully with Forwarder ID: a7e59660-959b-44e7-aa7e-baec820d01f4

전달자 업데이트가 실패하고 동일한 전달자를 입력하면 실패한 전달자를 다시 시도하거나 프로세스를 다시 시작하라는 메시지가 표시됩니다. 실패한 전달자 ID와 일치하지 않는 전달자 ID를 입력하면 재시도 옵션이 표시되지 않으며 전달자 업데이트의 일반적인 프로세스가 계속됩니다. 재시도 메커니즘을 통해 사용자는 이전에 실패한 시도에서 제공된 옵션 값을 대화형 방식으로 변경할 수 있습니다. Enter 키를 눌러 전달자 업데이트 흐름의 옵션에 동일한 값을 재사용합니다.

delete 인수

이 인수를 사용하여 전달자 ID를 사용하는 전달자를 삭제합니다. 실행 시 삭제할 피드의 ID를 요청합니다. 기존 전달자를 삭제하려면 다음 명령어를 사용합니다.

chronicle_cli forwarders delete --help
Usage: main forwarders delete [OPTIONS]

  Delete a forwarder using Forwarder ID

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
$ chronicle_cli forwarders delete
Enter Forwarder ID: 0593ba21-a1c7-4279-b429-bc8df959bd59

Deleting forwarder and all its associated collectors...

Forwarder (ID: 0593ba21-a1c7-4279-b429-bc8df959bd59) deleted successfully with all its associated collectors.

generate_files 인수

이 인수를 사용하여 전달자 ID를 사용하여 전달자에 대한 정보가 있는 파일을 생성합니다.

전달자 파일을 생성하려면 다음 명령어를 사용합니다.

$ chronicle_cli forwarders generate_files -h
Usage: main forwarders generate_files [OPTIONS]

  Generate forwarder configuration files using Forwarder ID

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -f, --file-path TEXT            Download generated forwarder files to the
                                  specified path.
  -h, --help                      Show this message and exit.
샘플 출력
$ chronicle_cli forwarders generate_files --file-path=$HOME/GenerateForwarderFile
Enter Forwarder ID: 0768220e-8af6-4ef7-a1dd-73e33963b444
Generating forwarder files ...
Forwarder files generated successfully.
Configuration file: /usr/local/google/home/<user>/GenerateForwarderFile_forwarder.conf
Auth file: /usr/local/google/home/<user>/GenerateForwarderFile_forwarder_auth.conf

수집기 하위 명령어

create 인수

다음 명령어를 사용하여 지정된 전달자의 새 수집기를 구성합니다.

$ chronicle_cli forwarders collectors create --help
Usage: main forwarders collectors create [OPTIONS]

  Create a collector.

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
$ chronicle_cli forwarders collectors create
================================================================================
Press Enter if you want to use the default value mentioned besides field description in [] brackets.
================================================================================

Enter Forwarder ID: a7e59660-959b-44e7-aa7e-baec820d01f4

(*) Collector Display Name: collector_4

========================================
======== Collector Configuration ======
========================================

(*) Collector Log Type (Type of logs collected): WINDOWS_DNS

Do you want to proceed with Collector Metadata? [y/N]: y

========================================
========== Collector Metadata ==========
========================================

Asset Namespace: test_namespace

========================================
=========== Forwarder Labels ===========
========================================

Labels (The ingestion metadata labels in 'key:value' format to apply to all logs ingested through this forwarder, as well as the resulting normalized data.)
Enter/Paste your content. On a new line, press Ctrl-D (Linux) / [Ctrl-Z + Enter (Windows)] to save it:
key1:value1
key2:value2

Do you want to proceed with Collector Regex Filters? [y/N]: y

========================================
======= Collector Regex Filters =======
========================================

Filter Description (Describes what is being filtered and why): desc1

Filter Regexp (The regular expression used to match against each incoming line): .*

Filter Behavior (Filter behavior to apply when a match is found)
Choose:
1. allow
2. block
: 1

You have selected allow

Do you want to add more Collector Regex Filters? [y/N]: n

Do you want to proceed with Collector Disk Buffer? [y/N]: n

Maximum Seconds per Batch (Maximum number of seconds between forwarder batch uploads) [10]:

Maximum Bytes per Batch (Maximum number of bytes queued before forwarder batch upload) [1048576]:

========================================
===== Configure Ingestion Settings =====
========================================

Choose:
1. File Settings
2. Kafka Settings
3. Pcap Settings
4. Splunk Settings
5. Syslog Settings

File Path (Path of file to monitor): path/to/file.txt

Preview changes:

  - Press Up/b or Down/z keys to paginate.
  - To switch case-sensitivity, press '-i' and press enter. By default, search
    is case-sensitive.
  - To search for specific field, press '/' key, enter text and press enter.
  - Press 'q' to quit and confirm preview changes.
  - Press `h` for all the available options to navigate the list.
=============================================================================

Config:
  File settings:
    File path: path/to/file.txt
  Log type: WINDOWS_DNS
  Max bytes per batch: 1048576
  Max seconds per batch: 10
  Metadata:
    Asset namespace: test_namespace
    Labels:
    - key: key1
      value: value1
    - key: key2
      value: value2
  Regex filters:
    Behavior: ALLOW
    Description: desc1
    Regexp: .*
Display name: collector_4

Do you want to create collector with this configuration? [y/N]: y

Creating collector...
Collector created successfully with Collector ID: 3a74b289-ccb4-4cee-9713-611a3362f48f

수집기 만들기가 실패하고 동일한 수집기 ID를 입력하면 실패한 수집기를 다시 시도하거나 프로세스를 다시 시작하라는 메시지가 표시됩니다. 실패한 수집기 ID와 일치하지 않는 수집기 ID를 입력하면 재시도 옵션이 표시되지 않으며 수집기 업데이트 일반 프로세스가 계속됩니다.

샘플 출력
$ chronicle_cli forwarders collectors create
Enter Forwarder ID: a7e59660-959b-44e7-aa7e-baec820d01f4

Looks like there was a failed create/update attempt for test_display.
Would you like to retry?

(*) Collector Display Name [test_display]:

========================================
======== Collector Configuration ======
========================================

(*) Collector Log Type (Type of logs collected) [WINDOWS_DNS]:

Do you want to proceed with Collector Metadata? [y/N]: y

========================================
========== Collector Metadata ==========
========================================

Asset Namespace [test]:

========================================
=========== Forwarder Labels ===========
========================================

Labels (The ingestion metadata labels in 'key:value' format to apply to all logs ingested through this forwarder, as well as the resulting normalized data.)
Enter/Paste your content. On a new line, press Ctrl-D (Linux) / [Ctrl-Z + Enter (Windows)] to save it:
[[{'key': 'k1', 'value': 'v1'}]]

Do you want to proceed with Collector Regex Filters? [y/N]: y

========================================
======= Collector Regex Filters =======
========================================

Filter Description (Describes what is being filtered and why)[old_desc]: desc2

Filter Regexp (The regular expression used to match against each incoming line) [.*]:

Filter Behavior (Filter behavior to apply when a match is found)
Choose:
1. allow
2. block

You have selected allow

Do you want to add more Collector Regex Filters? [y/N]: n

Do you want to proceed with Collector Disk Buffer? [y/N]: n

Maximum Seconds per Batch (Maximum number of seconds between forwarder batch uploads) [10]:

Maximum Bytes per Batch (Maximum number of bytes queued before forwarder batch upload) [1048576]:

========================================
===== Configure Ingestion Settings =====
========================================

Choose:
1. File Settings
2. Kafka Settings
3. Pcap Settings
4. Splunk Settings
5. Syslog Settings
: 1

File Path (Path of file to monitor) [path/to/file.txt]: path/to/file.txt

Preview changes:

  - Press Up/b or Down/z keys to paginate.
  - To switch case-sensitivity, press '-i' and press enter. By default, search
    is case-sensitive.
  - To search for specific field, press '/' key, enter text and press enter.
  - Press 'q' to quit and confirm preview changes.
  - Press `h` for all the available options to navigate the list.
=============================================================================

Config:
  File settings:
    File path: path/to/file.txt
  Log type: WINDOWS_DNS
  Max bytes per batch: 1048576
  Max seconds per batch: 10
  Metadata:
    Asset namespace: test
    Labels:
    - key: k1
      value: v1
  Regex filters:
    Behavior: ALLOW
    Description: disc2
    Regexp: .*
Display name: test_display

Do you want to create collector with this configuration? [y/N]: y

Creating collector...
Collector created successfully with Collector ID: b50a6b41-5476-41ee-ba7c-ce529ecffa62

get 인수

기존 수집기의 세부정보를 가져오려면 다음 명령어를 사용합니다.

$ chronicle_cli forwarders collectors get --help
Usage: main forwarders collectors get [OPTIONS]

  Get a collector using collector ID.

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력

수집기 세부정보를 가져오려면 대화형으로 수집기 ID를 입력해야 합니다.

$ chronicle_cli forwarders collectors get
Enter Forwarder ID: a7e59660-959b-44e7-aa7e-baec820d01f4
Enter Collector ID: 3a74b289-ccb4-4cee-9713-611a3362f48f

Fetching collector details...

Collector Details:

ID: 3a74b289-ccb4-4cee-9713-611a3362f48f
Display name: collector_4
State: ACTIVE
Config:
  Log type: WINDOWS_DNS
  Metadata:
    Asset namespace: test_namespace
    Labels:
    - key: key1
      value: value1
    - key: key2
      value: value2
  Regex filters:
  - description: desc1
    regexp: .*
    behavior: ALLOW
  - description: desc2
    regexp: .*
    behavior: BLOCK
  Max seconds per batch: 10
  Max bytes per batch: '1048576'
  File settings:
    File path: path/to/file.txt

list 인수

모든 수집기 목록을 표시하려면 다음 명령어를 사용합니다.

chronicle_cli forwarders collectors list --help
Usage: main forwarders collectors list [OPTIONS]

  List all collectors.

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  --export TEXT                   Export output to specified file path.
  --file-format [TXT|CSV|JSON]    Format of the file to be exported.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
$ chronicle_cli forwarders collectors list
Enter Forwarder ID: a7e59660-959b-44e7-aa7e-baec820d01f4

Collector Details:

ID: 153e4077-cd49-4ce5-87aa-254d239b9dda
Display name: collector_2
State: ACTIVE
Config:
  Log type: WINDOWS_DNS
  Metadata:
    Asset namespace: test
    Labels:
    - key: key1
      value: value1
    - key: key2
      value: value2
  Regex filters:
  - description: desc1
    regexp: .*
    behavior: ALLOW
  Disk buffer:
    State: ACTIVE
    Directory path: path/to/dir
    Max file buffer bytes: '209'
  Max seconds per batch: 10
  Max bytes per batch: '1048576'
  File settings:
    File path: path/to/file.txt

================================================================================

Collector Details:

ID: b50a6b41-5476-41ee-ba7c-ce529ecffa62
Display name: test_display
State: ACTIVE
Config:
  Log type: WINDOWS_DNS
  Metadata:
    Asset namespace: test
    Labels:
    - key: k1
      value: v1
  Regex filters:
  - description: disc2
    regexp: .*
    behavior: ALLOW
  - description: test
    regexp: test
    behavior: BLOCK
  Disk buffer:
    State: ACTIVE
    Directory path: test
    Max file buffer bytes: '55'
  Max seconds per batch: 5
  Max bytes per batch: '556676'
  Syslog settings:
    Protocol: TCP
    Address: 1.2.3.4
    Port: 3456
    Buffer size: '65536'
    Connection timeout: 60
    Tls settings:
      Certificate: test
      Certificate key: test
      Minimum tls version: '56'
      Insecure skip verify: true

================================================================================

update 인수

기존 수집기를 업데이트하려면 다음 명령어를 사용합니다.

$ chronicle_cli forwarders collectors update --help
Usage: main forwarders collectors update [OPTIONS]

  Update a collector using collector ID.

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
$ chronicle_cli forwarders collectors update
Enter Forwarder ID: a7e59660-959b-44e7-aa7e-baec820d01f4
Enter Collector ID: 3a74b289-ccb4-4cee-9713-611a3362f48f

(*) Collector Display Name [collector_4]:

========================================
======== Collector Configuration ======
========================================

(*) Collector Log Type (Type of logs collected) [WINDOWS_DNS]:

Do you want to proceed with Collector Metadata? [y/N]: y

========================================
========== Collector Metadata ==========
========================================

Asset Namespace [test_namespace]:

========================================
=========== Forwarder Labels ===========
========================================

Labels (The ingestion metadata labels in 'key:value' format to apply to all logs ingested through this forwarder, as well as the resulting normalized data.)
Enter/Paste your content. On a new line, press Ctrl-D (Linux) / [Ctrl-Z + Enter (Windows)] to save it:
[{'key1':'value1'},{'key2':'value2'}]

Do you want to proceed with Collector Regex Filters? [y/N]: y

========================================
======= Collector Regex Filters =======
========================================

Filter Description (Describes what is being filtered and why)[old_desc]: desc1

Filter Regexp (The regular expression used to match against each incoming line)[.*]: .*

Filter Behavior (Filter behavior to apply when a match is found)
Choose:
1. allow
2. block

You have selected allow

Do you want to add more Collector Regex Filters? [y/N]: y

Filter Description (Describes what is being filtered and why): desc2

Filter Regexp (The regular expression used to match against each incoming line): .*

Filter Behavior (Filter behavior to apply when a match is found)
Choose:
1. allow
2. block
: 2

You have selected block

Do you want to add more Collector Regex Filters? [y/N]: n

Do you want to proceed with Collector Disk Buffer? [y/N]: n

Maximum Seconds per Batch (Maximum number of seconds between forwarder batch uploads) [10]:

Maximum Bytes per Batch (Maximum number of bytes queued before forwarder batch upload) [1048576]:

========================================
===== Configure Ingestion Settings =====
========================================

Choose:
1. File Settings
2. Kafka Settings
3. Pcap Settings
4. Splunk Settings
5. Syslog Settings

File Path (Path of file to monitor) [path/to/file.txt]: path/to/file.txt

Do you want to update collector with this configuration? [y/N]: y

Updating collector...

Collector updated successfully with Collector ID: 3a74b289-ccb4-4cee-9713-611a3362f48f

수집기 업데이트가 실패하고 동일한 수집기 ID를 입력하면 실패한 수집기를 다시 시도하거나 프로세스를 다시 시작하라는 메시지가 표시됩니다. 실패한 수집기 ID와 일치하지 않는 수집기 ID를 입력하면 재시도 옵션이 표시되지 않고 수집기 업데이트 일반 프로세스가 계속됩니다. 재시도 메커니즘을 통해 사용자는 이전에 실패한 시도에서 제공된 옵션 값을 대화형 방식으로 변경할 수 있습니다. Enter 키를 눌러 수집기 업데이트 흐름의 옵션에 동일한 값을 재사용합니다.

...
Updating collector...

Do you want to update collector with this configuration? [y/N]: y

Error occurred while updating collector.
Response Code: 400.
Error: generic::invalid_argument: update collector (id: 3a74b289-ccb4-4cee-9713-611a3362f48f) for forwarder (id: a7e59660-959b-44e7-aa7e-baec820d01f4) for customer (id: ed19f037-2354-43df-bfbf-350362b45844): validation errors in request: generic::invalid_argument: filter's description is not specified: invalid argument

$ chronicle_cli forwarders collectors update
Enter Forwarder ID: a7e59660-959b-44e7-aa7e-baec820d01f4
Enter Collector ID: 3a74b289-ccb4-4cee-9713-611a3362f48f

Looks like there was a failed create/update attempt for collector_4.
Would you like to retry?

(*) Collector Display Name [collector_4]:

========================================
======== Collector Configuration ======
========================================

(*) Collector Log Type (Type of logs collected) [WINDOWS_DNS]:

Do you want to proceed with Collector Metadata? [y/N]: n

Do you want to proceed with Collector Regex Filters? [y/N]: y

========================================
======= Collector Regex Filters =======
========================================

Filter Description (Describes what is being filtered and why)[old_desc]: desc1

Filter Regexp (The regular expression used to match against each incoming line) [.*]:

Filter Behavior (Filter behavior to apply when a match is found)
Choose:
1. allow
2. block

You have selected allow

Do you want to add more Collector Regex Filters? [y/N]: n

Do you want to proceed with Collector Disk Buffer? [y/N]: n

Maximum Seconds per Batch (Maximum number of seconds between forwarder batch uploads) [10]:

Maximum Bytes per Batch (Maximum number of bytes queued before forwarder batch upload) [1048576]:

========================================
===== Configure Ingestion Settings =====
========================================

Choose:
1. File Settings
2. Kafka Settings
3. Pcap Settings
4. Splunk Settings
5. Syslog Settings
[1]:

File Path (Path of file to monitor) [path/to/file.txt]:

Do you want to update collector with this configuration? [y/N]: y

Updating collector...

Collector updated successfully with Collector ID: 3a74b289-ccb4-4cee-9713-611a3362f48f

delete 인수

수집기 ID를 사용하여 수집기를 삭제하려면 이 인수를 사용합니다. 실행 시 수집기의 ID를 삭제할 것을 요청합니다.

기존 수집기를 삭제하려면 다음 명령어를 사용합니다.

$ chronicle_cli forwarders collectors delete --help
Usage: main forwarders collectors delete [OPTIONS]

  Delete a collector using collector ID.

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -h, --help                      Show this message and exit.
샘플 출력
$ chronicle_cli forwarders collectors delete
Enter Forwarder ID: a7e59660-959b-44e7-aa7e-baec820d01f4
Enter Collector ID: 3a74b289-ccb4-4cee-9713-611a3362f48f

Collector (ID: 3a74b289-ccb4-4cee-9713-611a3362f48f) deleted successfully.

옵션

도움말(-h / --help)

명령어/옵션의 사용/설명을 보려면 -h 또는 --help 옵션을 사용합니다.

사용 예시
$ chronicle_cli forwarders list -h
Usage: main forwarders list [OPTIONS]

  List all forwarders

Options:
  --url TEXT                      Base URL to be used for API calls.
  --region [ASIA-NORTHEAST1|ASIA-SOUTH1|ASIA-SOUTHEAST1|AUSTRALIA-SOUTHEAST1|EUROPE|EUROPE-WEST2|EUROPE-WEST3|EUROPE-WEST6|ME-CENTRAL2|ME-WEST1|NORTHAMERICA-NORTHEAST2|US]
                                  Select region.
  --verbose                       Prints verbose output to the console.
  --export TEXT                   Export output to specified file path.
  --file-format [TXT|CSV|JSON]    Format of the file to be exported.
  -c, --credential_file TEXT      Path of Service Account JSON. Default: /usr/
                                  local/google/home/<user>/.chronicle_cl
                                  i/chronicle_credentials.json
  -h, --help                      Show this message and exit.

사용자 인증 정보 경로(-c 또는 --credential-path)

이 옵션을 사용하면 사용자 인증에 사용할 서비스 계정 사용자 인증 정보의 경로를 지정할 수 있습니다. 이 옵션을 지정하지 않으면 Chronicle CLI가 기본 경로, 즉 ~/.chronicle_cli(홈 디렉터리에 있는 .chronicle_cli라는 숨겨진 디렉터리 내)에서 사용자 인증 정보를 찾습니다.

사용 예시
$ chronicle_cli forwarders list --credential-path=C:\chronicle_credentials.json

세부정보(--verbose)

이 옵션을 사용하면 수신된 HTTP 요청과 수신된 응답의 세부정보를 출력할 수 있습니다.

사용 예시
$ chronicle_cli forwarders list --verbose

내보내기(--export)

이 옵션을 사용하면 list 명령어의 출력을 내보낼 파일 경로를 지정할 수 있습니다. 상대 경로와 절대 경로 모두 지원됩니다.

사용 예시
$ chronicle_cli forwarders list --export=$HOME/listForwarderssResponse

파일 형식(--file-format)

이 옵션을 사용하면 list 명령어로 내보낸 콘텐츠의 파일 형식을 지정할 수 있습니다. 지원되는 형식은 CSV, JSON, TXT입니다. --export 옵션으로 이 옵션을 지정하지 않으면 CSV 형식이 기본값으로 사용됩니다.

사용 예시
$ chronicle_cli forwarders list --export=$HOME/listForwardersResponse --file-format=JSON
샘플 출력
JSON 형식
{
  "forwarders": [
    {
      "name": "55a77e24-9d16-4638-8940-0ef8071ed849",
      "displayName": "new",
      "config": {
        "uploadCompression": true,
        "metadata": {
          "assetNamespace": "test",
          "labels": [
            {
              "key": "k",
              "value": "v"
            },
            {
              "key": "k1",
              "value": "v1"
            }
          ]
        },
        "regexFilters": [
          {
            "description": "desc1",
            "regexp": ".*",
            "behavior": "ALLOW"
          }
        ],
        "serverSettings": {
          "gracefulTimeout": 15,
          "drainTimeout": 10,
          "httpSettings": {
            "port": 8080,
            "host": "0.0.0.0",
            "readTimeout": 3,
            "readHeaderTimeout": 3,
            "writeTimeout": 3,
            "idleTimeout": 3,
            "routeSettings": {
              "availableStatusCode": 204,
              "readyStatusCode": 204,
              "unreadyStatusCode": 503
            }
          },
          "state": "ACTIVE"
        }
      },
      "state": "ACTIVE",
      "collectors": {
        "Collector [3e8243c3-7ff2-4ede-89fe-16410ffe03bd]": {
          "name": "3e8243c3-7ff2-4ede-89fe-16410ffe03bd",
          "displayName": "cre_test_2",
          "state": "ACTIVE",
          "config": {
            "logType": "WINDOWS_DNS",
            "metadata": {
              "assetNamespace": "test",
              "labels": [
                {
                  "key": "k",
                  "value": "v"
                }
              ]
            },
            "regexFilters": [
              {
                "description": "desc1",
                "regexp": ".*",
                "behavior": "ALLOW"
              }
            ],
            "diskBuffer": {
              "state": "ACTIVE",
              "directoryPath": "23",
              "maxFileBufferBytes": "33"
            },
            "maxSecondsPerBatch": 10,
            "maxBytesPerBatch": "1048576",
            "fileSettings": {
              "filePath": "path/file.txt"
            }
          }
        }
      }
    }
  ]
}
CSV 형식

1. {file_name}_forwarders.csv

2. {file_name}_collectors.csv

파일의 샘플 콘텐츠:

{file_name}_forwarders.csv:

Name,Display name,Forwarder state,[CONFIG] Upload compression,[CONFIG][METADATA] Asset namespace,[CONFIG][METADATA] Labels,[CONFIG] Regex filters,[CONFIG][SERVER_SETTINGS] Server state,[CONFIG][SERVER_SETTINGS] Graceful timeout,[CONFIG][SERVER_SETTINGS] Drain timeout,[CONFIG][SERVER_SETTINGS][HTTP_SETTINGS] Port,[CONFIG][SERVER_SETTINGS][HTTP_SETTINGS] Host,[CONFIG][SERVER_SETTINGS][HTTP_SETTINGS] Read timeout,[CONFIG][SERVER_SETTINGS][HTTP_SETTINGS] Read header timeout,[CONFIG][SERVER_SETTINGS][HTTP_SETTINGS] Write timeout,[CONFIG][SERVER_SETTINGS][HTTP_SETTINGS] Idle timeout,[CONFIG][SERVER_SETTINGS][HTTP_SETTINGS][ROUTE_SETTINGS] Available status code,[CONFIG][SERVER_SETTINGS][HTTP_SETTINGS][ROUTE_SETTINGS] Ready status code,[CONFIG][SERVER_SETTINGS][HTTP_SETTINGS][ROUTE_SETTINGS] Unready status code
0593ba21-a1c7-4279-b429-bc8df959bd59,test,ACTIVE,True,test,"k1: v1

k2: v2
",,,,,,,,,,,0,0,0
094c9e41-e7c8-407a-8b9a-eb34d608a609,test,ACTIVE,True,te,"k1: v1

k2: v2
",,,,,,,,,,,0,0,0
1189f869-5f3c-4ec7-ba48-9c80e33aadf0,test,ACTIVE,True,test,"key1: value1

key2: value2
",,ACTIVE,15,10,8080,0.0.0.0,3,4,5,8,204,204,500

{file_name}_collectors.csv

Forwarder ID,Name,Display Name,Collector state,[CONFIG] Log type,[CONFIG] Max seconds per batch,[CONFIG] Max bytes per batch,[CONFIG][METADATA] Asset namespace,[CONFIG][METADATA] Labels,[CONFIG] Regex filters,[CONFIG][DISK_BUFFER] State,[CONFIG][DISK_BUFFER] Directory path,[CONFIG][DISK_BUFFER] Max file buffer bytes,[CONFIG][FILE_SETTINGS] File path,[CONFIG][KAFKA_SETTINGS][AUTHENTICATION] username,[CONFIG][KAFKA_SETTINGS][AUTHENTICATION] password,[CONFIG][KAFKA_SETTINGS] Topic,[CONFIG][KAFKA_SETTINGS] Group id,[CONFIG][KAFKA_SETTINGS] Timeout,[CONFIG][KAFKA_SETTINGS] Brokers,[CONFIG][KAFKA_SETTINGS][TLS_SETTINGS] Certificate,[CONFIG][KAFKA_SETTINGS][TLS_SETTINGS] Certificate key,[CONFIG][KAFKA_SETTINGS][TLS_SETTINGS] Minimum tls version,[CONFIG][KAFKA_SETTINGS][TLS_SETTINGS] Insecure skip verify,[CONFIG][PCAP_SETTINGS] Network interface,[CONFIG][PCAP_SETTINGS] Bpf,[CONFIG][SPLUNK_SETTINGS][AUTHENTICATION] username,[CONFIG][SPLUNK_SETTINGS][AUTHENTICATION] Password,[CONFIG][SPLUNK_SETTINGS] Host,[CONFIG][SPLUNK_SETTINGS] Port,[CONFIG][SPLUNK_SETTINGS] Minimum window size,[CONFIG][SPLUNK_SETTINGS] Maximum windows size,[CONFIG][SPLUNK_SETTINGS] Query string,[CONFIG][SPLUNK_SETTINGS] Query mode,[CONFIG][SPLUNK_SETTINGS] Cert ignored,[CONFIG][SYSLOG_SETTINGS] Protocol,[CONFIG][SYSLOG_SETTINGS] Address,[CONFIG][SYSLOG_SETTINGS] Port,[CONFIG][SYSLOG_SETTINGS] Buffer size,[CONFIG][SYSLOG_SETTINGS] Connection timeout,[CONFIG][SYSLOG_SETTINGS][TLS_SETTINGS] Certificate,[CONFIG][SYSLOG_SETTINGS][TLS_SETTINGS] Certificate key,[CONFIG][SYSLOG_SETTINGS][TLS_SETTINGS] Minimum tls version,[CONFIG][SYSLOG_SETTINGS][TLS_SETTINGS] Insecure skip verify
1189f869-5f3c-4ec7-ba48-9c80e33aadf0,03d28371-1bcb-4b28-9364-18412de1f827,collector_2,ACTIVE,WINDOWS_DNS,10,1048576,collector_update,"key1: value1

key2: value2
",,ACTIVE,path/file.txt,23,path/to/file.txt,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1189f869-5f3c-4ec7-ba48-9c80e33aadf0,8ba8278c-1eef-4a72-a45a-491463768c70,col_3,ACTIVE,WINDOWS_DNS,10,1048576,test,"k1: v1
",,ACTIVE,path/to/file,233,path,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
55a77e24-9d16-4638-8940-0ef8071ed849,3e8243c3-7ff2-4ede-89fe-16410ffe03bd,cre_test_2,ACTIVE,WINDOWS_DNS,10,1048576,test,"k: v
",,ACTIVE,23,33,path/file.txt,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

리전(--region)

명령어를 실행할 때 --region 플래그를 전달하여 리전을 선택할 수 있습니다. 기본 리전을 설정하는 방법에 대한 자세한 내용은 기본 리전 설정을 참조하세요.

문제 해결

오류 코드

이 섹션에서는 API 응답에서 수신된 다양한 유형의 응답 코드에 대해 콘솔에 표시되는 출력을 보여줍니다.

각 명령어의 출력을 보려면 다음 표를 참조하세요.

Get 명령어

응답 코드 콘솔 출력
404 {Forwarder|Collector}이(가) 존재하지 않음
400 {Forwarder|Collector} ID가 잘못되었습니다. 올바른 {Forwarder|Collector} ID를 입력하세요.
기타 응답 코드 {Forwarder|Collector}를 가져오는 중에 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}

List 명령어

응답 코드 콘솔 출력
200 이외의 모든 응답 코드 오류: 응답 코드: {status code} 오류: {error message}

Create 명령어

응답 코드 콘솔 출력
200 이외의 모든 응답 코드 {forwarder|collector} 생성 중 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}

Update 명령어

응답 코드 콘솔 출력
200 이외의 모든 응답 코드 {forwarder|collector}를 업데이트하는 중에 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}

Delete 명령어

응답 코드 콘솔 출력
404 {Forwarder|Collector}이(가) 존재하지 않음
400 {Forwarder|Collector} ID가 잘못되었습니다. 올바른 {Forwarder|Collector} ID를 입력하세요.
기타 응답 코드 {Forwarder|Collector}를 삭제하는 중에 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}

기타 오류 또는 예외

예외 콘솔 출력
KeyError 응답에서 {key name} 키를 찾을 수 없습니다.
예외 예외와 함께 실패: {exception details}
사용자 인증 정보 파일 누락 예외와 함께 실패: [Errno 2] 파일 또는 디렉터리가 없음: '/usr/local/google/home//.chronicle_cli/chronicle_credentials.json'

예상 디렉터리에 사용자 인증 정보를 배치해야 합니다. 설치를 참조하세요.

Chronicle CLI와 관련된 기타 질문 또는 문제는 Chronicle 지원팀에 문의하세요.

BigQuery 데이터 액세스 워크플로

Chronicle은 BigQuery에서 Chronicle 데이터에 대한 셀프서비스 액세스를 지원합니다. Chronicle CLI를 사용하여 사용자 이메일에 다음 권한을 부여하는 Identity and Access Management(IAM) 역할을 부여할 수 있습니다.

  • roles/bigquery.dataViewer
  • roles/bigquery.jobUser
  • roles/storage.objectViewer

이메일은 Chronicle 보안 고객의 Google 계정 및 ID 관리(GAIA) 사용자 이메일 주소여야 합니다.

이러한 역할에 대한 자세한 내용은 테이블 데이터 내보내기를 참조하세요.

명령어

bigquery 명령어

bigquery 명령어는 provide_access 인수를 사용합니다.

사용 문법:

$ chronicle_cli bigquery ARGUMENT [OPTIONS]

인수

provide_access 인수

사용자 이메일 주소를 입력하라는 메시지가 표시됩니다. 이메일은 Chronicle 보안 고객의 Google 계정 및 ID 관리(GAIA) 사용자 이메일 주소여야 합니다. 사용자에게 다음을 수행하는 데 필요한 IAM 역할이 부여됩니다.

  • BigQuery 테이블에서 데이터 및 메타데이터 읽기(roles/bigquery.dataViewer)
  • BigQuery 테이블 데이터에서 쿼리 실행(roles/bigquery.jobUser)
  • Google Cloud Storage 버킷에서 데이터 읽기(roles/storage.objectViewer)
사용 예시
$ chronicle_cli bigquery provide_access
$ Enter email: xyz@gmail.com
성공 응답
Providing BigQuery access...
Access provided to email: xyz@gmail.com
오류 응답
Providing BigQuery access...
Error while providing access:
Response code: 400

옵션

도움말(-h / --help)

-h 또는 --help 옵션을 사용하여 명령어/옵션의 사용/설명을 확인할 수 있습니다.

문제 해결

이 섹션에서는 API 응답에서 수신된 다양한 유형의 응답 코드에 대해 콘솔에 표시되는 출력을 보여줍니다.

provide_access 인수 응답 코드

응답 코드 콘솔 출력
400 이메일이 존재하지 않습니다.
기타 응답 코드 피드를 가져오는 중에 오류가 발생했습니다. 응답 코드: {status code} 오류: {error message}