Lihat log

Log pemberi rekomendasi mencatat perubahan pada status rekomendasi dan insight.

Izin

Izin dan peran Identity and Access Management menentukan log mana yang dapat Anda lihat dan ekspor.

Untuk melihat log Pemberi Rekomendasi, Anda harus memiliki salah satu peran IAM berikut dalam project yang berisi log Anda:

  • Salah satu peran dasar: Project Owner, Project Editor, atau Project Viewer.
  • Peran Logs Viewer Cloud Logging.
  • Peran IAM kustom dengan izin IAM logging.logEntries.list.

Melihat log

Log Rekomendasi

Untuk melihat log tindakan rekomendasi:

  1. Buka halaman Google Cloud Observability Logging > Logs (Logs Explorer) di Konsol Google Cloud:

    Buka halaman Logs Explorer

  2. Pilih project Google Cloud yang ada di bagian atas halaman atau buat project baru.

  3. Di menu drop-down pertama, pilih Pemberi rekomendasi.

  4. Luaskan entri log untuk melihat detail entri. Contoh berikut menunjukkan rekomendasi yang diklaim.

    {
     insertId:  "t51fxaa1"
     jsonPayload: {
      @type:  "type.googleapis.com/google.cloud.recommender.logging.v1.ActionLog"
      actor:  "user@gmail.com"
      recommendationName:   "projects/my-recommender-project/locations/global/recommenders/google.iam.policy.Recommender/recommendations/r1"
      state:  "CLAIMED"
      stateMetadata: {
        my_metadata: "Some metadata."
      }
     }
     logName:  "projects/my-recommender-project/logs/recommender.googleapis.com%2Factions"
     receiveTimestamp:  "2019-07-01T21:55:06.950795284Z"
     resource: {
      labels: {
       location:  "global"
       project_id:  "my-recommender-project"
       recommender_id:  "google.iam.policy.Recommender"
      }
      type:  "recommender"
     }
     severity:  "INFO"
     timestamp:  "2019-07-01T21:55:06.529Z"
    }
    

Log Insight

Untuk melihat log tindakan insight:

  1. Buka halaman Google Cloud Observability Logging > Logs (Logs Explorer) di Konsol Google Cloud:

    Buka halaman Logs Explorer

  2. Pilih project Google Cloud yang ada di bagian atas halaman atau buat project baru.

  3. Di menu drop-down pertama, pilih InsightType.

  4. Luaskan entri log untuk melihat detail entri. Contoh berikut menunjukkan wawasan yang diterima.

    {
     insertId:  "t51fxaa1"
     jsonPayload: {
      @type:  "type.googleapis.com/google.cloud.recommender.logging.v1.InsightActionLog"
      actor:  "user@gmail.com"
      insight:   "projects/my-recommender-project/locations/global/insightTypes/google.iam.policy.Insight/insights/i1"
      state:  "ACCEPTED"
      stateMetadata: {
        my_metadata: "Some metadata."
      }
     }
     logName:  "projects/my-recommender-project/logs/recommender.googleapis.com%2Factions"
     receiveTimestamp:  "2019-07-01T21:55:06.950795284Z"
     resource: {
      labels: {
       location:  "global"
       project_id:  "my-recommender-project"
       insight_type_id:  "google.iam.policy.Recommender"
      }
      type:  "recommender_insight_type"
     }
     severity:  "INFO"
     timestamp:  "2019-07-01T21:55:06.529Z"
    }