Personalized Service Health 액세스 관리

이 문서에서는 다음 작업을 할 수 있도록 권한을 설정하고 액세스를 사용 설정하는 방법을 설명합니다.

  • Service Health 대시보드를 사용하여 서비스 상태 이벤트를 확인합니다.
  • Service Health API를 사용하여 서비스 상태 정보를 가져옵니다.
  • 프로젝트와 관련된 알림을 구성합니다.

시작하기 전에

Make sure that billing is enabled for your Google Cloud project.

Service Health API 및 대시보드에 액세스

Personalized Service Health는 프로젝트 구성원에게 액세스 권한을 제공하는 데 사용할 수 있는 사전 정의된 servicehealth.viewer 역할을 제공합니다. 이 역할은 Service Health API 및 대시보드에 액세스하는 데 사용합니다.

역할 이름 설명 맞춤설정된 Service Health 권한
roles/servicehealth.viewer 맞춤설정된 Service Health 뷰어 서비스 상태 이벤트에 대한 읽기 전용 액세스 권한입니다. servicehealth.location.list

servicehealth.location.get

servicehealth.events.list

servicehealth.events.get

servicehealth.organizationEvents.list

servicehealth.organizationEvents.get

servicehealth.organizationImpacts.list

servicehealth.organizationImpacts.get

gcloud CLI를 통해 직접 역할과 권한을 사용하여 적절한 액세스 제어를 설정할 수 있습니다. 예를 들어 다음 명령어를 사용하여 역할을 직접 부여할 수 있습니다.

gcloud projects add-iam-policy-binding PROJECT_ID \
  --member {USER|GROUP|SERVICE_ACCOUNT} \
  --role roles/servicehealth.viewer

다음 명령어를 사용하여 지정된 프로젝트의 Identity and Access Management (IAM) 정책을 볼 수 있습니다.

gcloud projects get-iam-policy PROJECT_ID

또는 기존 역할에 직접 권한을 추가할 수도 있습니다.

gcloud iam roles update ROLE_ID --project=PROJECT_ID \
  --add-permissions=servicehealth.events.list
gcloud iam roles update ROLE_ID --project=PROJECT_ID \
  --add-permissions=servicehealth.events.get
gcloud iam roles update ROLE_ID --project=PROJECT_ID \
  --add-permissions=servicehealth.locations.list
gcloud iam roles update ROLE_ID --project=PROJECT_ID \
  --add-permissions=servicehealth.locations.get

프로젝트에서 API 및 서비스 사용

  1. 프로젝트에 Service Health API를 사용 설정합니다.
  2. 서비스 사용량 소비자 역할 (roles/serviceusage.serviceUsageConsumer)을 부여합니다.

로그 액세스 및 로그 알림 구성

다음 단계를 따르세요.

  1. 프로젝트에 Service Health API를 사용 설정합니다.
  2. 로그 기반 알림 권한을 받습니다.

모니터링 NotificationChannel 편집자 역할(roles/monitoring.notificationChannelEditor)을 부여하고 싶지 않다면 대신 모니터링 NotificationChannel 뷰어 역할 (roles/monitoring.notificationChannelViewer)을 부여하여 알림 채널을 알림 정책에 연결할 수 있습니다.

역할 부여에 대한 자세한 내용은 액세스 관리를 참조하세요.

커스텀 역할이나 다른 사전 정의된 역할을 통해 필요한 권한을 얻을 수도 있습니다.

단일 프로젝트에 Service Health API 사용 설정

알림을 설정하고 서비스 상태 정보를 가져오려면 Service Health API를 사용 설정해야 합니다. Google Cloud 콘솔 또는 Google Cloud CLI를 통해 API를 사용 설정할 수 있습니다.

콘솔

  1. API 및 서비스 라이브러리에서 Service Health API로 이동합니다.

    Service Health API로 이동

    또는 API 라이브러리로 이동하여 'Service Health API'를 검색할 수도 있습니다.

  2. 프로젝트를 선택합니다.

  3. 사용 설정 버튼을 선택합니다.

gcloud

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

  2. 최신 버전의 Google Cloud CLI가 설치되어 있는지 확인합니다. Cloud Shell에서 다음 명령어를 실행합니다.

      gcloud components update

  3. 새 프로젝트 PROJECT_ID를 만들거나 선택합니다.

    • 프로젝트를 만듭니다. Google Cloud

      gcloud projects create PROJECT_ID
    • 만든 Google Cloud 프로젝트를 선택합니다.

      gcloud projects config set project PROJECT_ID
  4. 방금 만든 프로젝트에서 Service Health API를 사용 설정합니다.

    gcloud services enable servicehealth.googleapis.com \
     --project PROJECT_ID
    

스크립트

스크립트를 사용하여 조직 또는 폴더의 프로젝트에 Service Health API를 사용 설정할 수 있습니다.

배경 정보는 Google Cloud 프로젝트에서 API 사용 설정하기를 참고하세요.

Service Health API 및 알림은 API 사용 설정 후 몇 시간 후에 새 이벤트를 인식합니다.