Viewing logs

Recommender logs record changes to recommendation state.

Permissions

Cloud Identity and Access Management permissions and roles determine which logs you can view and export.

To view Recommender logs, you must have one of the following Cloud IAM roles in the project that contains your logs:

  • One of the primitive roles: Project Owner, Project Editor, or Project Viewer.
  • The Stackdriver Logging Logs Viewer role.
  • A custom Cloud IAM role with the logging.logEntries.list Cloud IAM permission.

Viewing logs

To view logs:

  1. Go to the Stackdriver Logging > Logs (Logs Viewer) page in the GCP Console:

    Go to the Logs Viewer page

  2. Select an existing GCP project at the top of the page or create a new project.

  3. In the first drop-down menu, select Recommender.

  4. Expand a log entry to view the entry details. The following example shows a claimed recommendation.

    {
     insertId:  "t51fxaa1"
     jsonPayload: {
      @type:  "type.googleapis.com/google.cloud.recommender.logging.v1beta1.ActionLog"
      actor:  "user@gmail.com"
      recommendationName:   "projects/my-recommender-project/locations/global/recommenders/google.iam.policy.Recommender/recommendations/r1"
      state:  "CLAIMED"
     }
     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"
    }
    
Was this page helpful? Let us know how we did:

Send feedback about...

Recommender Documentation