검색

2.5. Ceph Object Gateway의 작업 로그 생성 및 수집

download PDF

사용자 ID 정보가 작업 로그 출력에 추가됩니다. 이는 고객이 S3 액세스 감사를 위해 이 정보에 액세스할 수 있도록 하는 데 사용됩니다. 모든 버전의 Ceph Object Gateway 작업 로그에서 S3 요청에 의해 안정적으로 사용자 ID를 추적합니다.

프로세스

  1. 로그가 있는 위치를 찾습니다.

    구문

    logrotate -f

    예제

    [root@host01 ~]# logrotate -f
    /etc/logrotate.d/ceph-12ab345c-1a2b-11ed-b736-fa163e4f6220

  2. 지정된 위치 내의 로그를 나열합니다.

    구문

    ll LOG_LOCATION

    예제

    [root@host01 ~]# ll /var/log/ceph/12ab345c-1a2b-11ed-b736-fa163e4f6220
     -rw-r--r--. 1 ceph ceph    412 Sep 28 09:26 opslog.log.1.gz

  3. 현재 버킷을 나열합니다.

    예제

    [root@host01 ~]# /usr/local/bin/s3cmd ls

  4. 버킷을 생성합니다.

    구문

    /usr/local/bin/s3cmd mb s3://NEW_BUCKET_NAME

    예제

    [root@host01 ~]# /usr/local/bin/s3cmd mb s3://bucket1
    Bucket `s3://bucket1` created

  5. 현재 로그를 나열합니다.

    구문

    ll LOG_LOCATION

    예제

    [root@host01 ~]# ll /var/log/ceph/12ab345c-1a2b-11ed-b736-fa163e4f6220
     total 852
     ...
     -rw-r--r--. 1 ceph ceph    920 Jun 29 02:17 opslog.log
     -rw-r--r--. 1 ceph ceph    412 Jun 28 09:26 opslog.log.1.gz

  6. 로그를 수집합니다.

    구문

    tail -f LOG_LOCATION/opslog.log

    예제

    [root@host01 ~]# tail -f /var/log/ceph/12ab345c-1a2b-11ed-b736-fa163e4f6220/opslog.log
    
    {"bucket":"","time":"2022-09-29T06:17:03.133488Z","time_local":"2022-09-
    29T06:17:03.133488+0000","remote_addr":"10.0.211.66","user":"test1",
    "operation":"list_buckets","uri":"GET /
    HTTP/1.1","http_status":"200","error_code":"","bytes_sent":232,
    "bytes_received":0,"object_size":0,"total_time":9,"user_agent":"","referrer":
    "","trans_id":"tx00000c80881a9acd2952a-006335385f-175e5-primary",
    "authentication_type":"Local","access_key_id":"1234","temp_url":false}
    
    {"bucket":"cn1","time":"2022-09-29T06:17:10.521156Z","time_local":"2022-09-
    29T06:17:10.521156+0000","remote_addr":"10.0.211.66","user":"test1",
    "operation":"create_bucket","uri":"PUT /cn1/
    HTTP/1.1","http_status":"200","error_code":"","bytes_sent":0,
    "bytes_received":0,"object_size":0,"total_time":106,"user_agent":"",
    "referrer":"","trans_id":"tx0000058d60c593632c017-0063353866-175e5-primary",
    "authentication_type":"Local","access_key_id":"1234","temp_url":false}

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.