수집기 목록 조회

수집기 목록을 조회합니다.

HTTP 요청

GET /api/sonar/loggers
cURL 예시
curl -H "Authorization: Bearer <API_KEY>" \
     https://HOSTNAME/api/sonar/loggers?offset=0&limit=10
요청 매개변수
필수타입설명비고
offsetX32비트 정수건너뛸 갯수기본값: 0
limitX32비트 정수최대 갯수
keywordsX문자열검색 키워드수집기 이름(name)에서 검색할 단어
schema_codeX문자열로그 스키마 식별자실시간 탐지 시나리오의 수집기 목록 지원용 필터
group_guidX문자열수집기 그룹 GUID

정상 응답

{
  "total_count": 1,
  "loggers": [
    {
      "id": 1,
      "guid": "b90ea540-4f47-4bcf-b708-af610a649c50",
      "name": "WTMP",
      "description": "",
      "table_name": "WTMP",
      "interval": 5000,
      "cron_schedule": null,
      "enabled": true,
      "status": "running",
      "failure": null,
      "is_passive": false,
      "model_guid": "cd09ae6f-fbc3-11ed-9320-02d178f999a6",
      "model_name": "WTMP",
      "group_guid": null,
      "group_name": null,
      "node_pair_guid": "27102ae5-3698-44d4-aad5-4f2def80f275",
      "node_pair_name": "control",
      "sentry_guid": null,
      "asset_guid": null,
      "asset_ip": null,
      "hostname": null,
      "log_count": 892,
      "log_volume": 97531,
      "drop_count": 0,
      "drop_volume": 0,
      "configs": {
        "path": "/var/log/wtmp",
        "server": null,
        "regex_filter_target_field": null,
        "regex_filter_pattern": null,
        "regex_filter_negate": "false",
        "dst_ip": null
      },
      "created": "2023-10-01 23:59:22+0900",
      "updated": "2023-10-01 23:59:39+0900"
    }
  ]
}
  • total_count (32비트 정수): 검색 조건과 일치하는 모든 수집기 개수
  • loggers (배열): 수집기 목록
    • id (32비트 정수): 수집기 번호
    • guid (문자열): 수집기 식별자
    • name (문자열): 수집기 이름
    • description (문자열): 수집기 설명
    • table_name (문자열): 수집된 로그를 저장할 테이블 이름
    • interval (32비트 정수): 수집 간격(단위: 밀리초)
    • cron_schedule (문자열): CRON 문법으로 작성된 수집 일정. 예를 들어 매일 새벽 4시 수집은 0 4 * * *
    • enabled (불리언): 활성화 여부
    • status (문자열): 동작 상태. running, stopped 중 하나. 활성화하더라도 수집기 오류로 인해 중지될 수 있음.
    • failure (문자열): 마지막 발생한 오류 내용. 예를 들어 SFTP 수집기는 Auth fail이 발생할 수 있음.
    • is_passive (불리언): 수집 간격이나 일정 설정과 무관하게 동작하는 수집기 여부
    • model_guid (문자열): 수집 모델 식별자
    • model_name (문자열): 수집 모델 이름
    • site_guid (문자열): 사이트 식별자
    • site_name (문자열): 사이트 이름
    • node_pair_guid (문자열): 서버 쌍 식별자
    • node_pair_name (문자열): 서버 쌍 이름
    • sentry_guid (문자열): 센트리 식별자
    • asset_guid (문자열): 자산 IP 식별자
    • asset_ip (문자열): 자산 IP 주소
    • hostname (문자열): 자산 호스트명
    • log_count (64비트 정수): 수집된 로그의 건수. 수집 후 정규식 필터로 버린 로그는 포함하지 않음
    • log_volume (64비트 정수): 수집된 로그의 바이트 단위 용량. 수집 후 정규식 필터로 버린 로그는 포함하지 않음
    • drop_count (64비트 정수): 정규식 필터로 버린 로그의 건수
    • drop_volume (64비트 정수): 정규식 필터로 버린 로그의 용량 (단위: 바이트)
    • configs (맵): 설정 키/값 쌍. 수집 모델의 수집 유형에 따라 다른 설정을 요구함.
    • created (문자열): 생성일시 (yyyy-MM-dd HH:mm:ssZ 형식)
    • updated (문자열): 수정일시 (yyyy-MM-dd HH:mm:ssZ 형식)
offset, limit 값이 정수가 아닌 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "'offset' parameter should be int type"
}
offset, limit 값이 음수인 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "'offset' must be greater than or equal to 0."
}