View maintenance logs

This page describes how to find and use Cloud Logging to query and view maintenance logs for a cluster in Memorystore for Redis Cluster.

View logs for scheduled maintenance

You can use the Google Cloud console to query and view logs for scheduled maintenance.

Console

  1. In the Google Cloud console, go to the Logs Explorer page.

    Logs Explorer

  2. At the top of the page, select your Google Cloud project.

  3. From the time-range menu, select a range for which you want to query maintenance logs. For example, you can query for logs that Memorystore for Redis Cluster captured over the past 30 days.

  4. In the Query builder, add the following lines of code:

    logName="projects/PROJECT_NAME/logs/maintenance.googleapis.com%2Factivity_log"
    labels.activity_type_name="CloudRedisClusterRolloutAdvanced"
    

    Replace PROJECT_NAME with the name of your Google Cloud project.

  5. Click Run query. The logs appear for scheduled maintenance.

View logs for in-progress maintenance

You can use the Google Cloud console to query and view logs for maintenance that's in progress.

Console

  1. In the Google Cloud console, go to the Logs Explorer page.

    Logs Explorer

  2. At the top of the page, select your Google Cloud project.

  3. From the time-range menu, select a range for which you want to query maintenance logs. For example, you can query for logs that Memorystore for Redis Cluster captured over the past 30 days.

  4. In the Query builder, add the following lines of code:

    logName="projects/PROJECT_NAME/logs/maintenance.googleapis.com%2Factivity_log"
    labels.activity_type_name="CloudRedisClusterRolloutInProgress"
    labels.is_completed="false"
    

    Replace PROJECT_NAME with the name of your Google Cloud project.

  5. Click Run query. The logs appear for maintenance that's in progress.

View logs for completed maintenance

You can use the Google Cloud console to query and view logs for maintenance that's completed.

Console

  1. In the Google Cloud console, go to the Logs Explorer page.

    Logs Explorer

  2. At the top of the page, select your Google Cloud project.

  3. From the time-range menu, select a range for which you want to query maintenance logs. For example, you can query for logs that Memorystore for Redis Cluster captured over the past 30 days.

  4. In the Query builder, add the following lines of code:

    logName="projects/PROJECT_NAME/logs/maintenance.googleapis.com%2Factivity_log"
    labels.activity_type_name="CloudRedisClusterRolloutInProgress"
    labels.is_completed="true"
    

    Replace PROJECT_NAME with the name of your Google Cloud project.

  5. Click Run query. The logs appear for maintenance that's completed.

View logs for canceled maintenance

You can use the Google Cloud console to query and view logs for maintenance that's canceled.

Console

  1. In the Google Cloud console, go to the Logs Explorer page.

    Logs Explorer

  2. At the top of the page, select your Google Cloud project.

  3. From the time-range menu, select a range for which you want to query maintenance logs. For example, you can query for logs that Memorystore for Redis Cluster captured over the past 30 days.

  4. In the Query builder, add the following lines of code:

    logName="projects/PROJECT_NAME/logs/maintenance.googleapis.com%2Factivity_log"
    labels.activity_type_name="CloudRedisClusterRolloutCanceled"
    

    Replace PROJECT_NAME with the name of your Google Cloud project.

  5. Click Run query. The logs appear for maintenance that's canceled.

Troubleshoot

This section lists issues that you might encounter when you try to view maintenance logs and provides guidance for resolving these issues.

You deactivate the _Default sink in Cloud Logging

In Logging, every project, folder, and organization has the following sinks:

  • _Required: capture audit logs and store them in the _Required bucket.

    You can't deactivate or delete this sink. Also, the logs in the bucket have a default retention period of 400 days.

  • _Default: route any Memorystore for Redis Cluster logs, including maintenance logs, that the _Required sink doesn't capture. The _Default sink stores these logs in the _Default bucket.

    Although you can't delete the _Defaultsink, you can deactivate it to stop it from routing logs to the _Default bucket. Also, the logs in the bucket have a default retention period of 30 days.

If you deactivate the _Default sink, then Logging drops all logs in the sink, including the maintenance.googleapis.com/activity_log, which is associated with all maintenance activities in Logging. As a result, Logging can't store the logs in the sink.

To check if you deactivated the _Default sink, do the following:

  1. Use the gcloud logging sinks describe command.

    gcloud logging sinks describe _Default --project=PROJECT_ID
    

    Replace PROJECT_ID with the ID or project number of the Google Cloud project that contains the sink.

  2. In the output, look at the value of the disabled parameter. If the value is true, then you deactivated the sink and you must re-enable it.

To re-enable the sink, do the following:

  1. Use the gcloud logging sinks update command.

    gcloud logging sinks update _Default --no-disabled --project=PROJECT_ID
    
  2. To verify that the sink is enabled, use the gcloud logging sinks describe command.

    gcloud logging sinks describe _Default --project=PROJECT_ID
    
  3. In the output, confirm that the value of the disabled parameter is false. You re-enabled the sink.

You don't configure sink filters correctly

In Logging, you can customize sinks to control which logs are stored in a Google Cloud project. To do this, create filters to specify the types of logs that you want the sinks to contain.

If you don't configure a filter for at least one sink to include logs with the log ID of maintenance.googleapis.com/activity_log, then Logging drops these logs. Because these logs are associated with all maintenance activities in Logging, you can't view the maintenance logs.

To check if the sink filters are configured correctly, do the following:

  1. Use the gcloud logging sinks list command.

    gcloud logging sinks list --project=PROJECT_ID
    

    Replace PROJECT_ID with the ID or project number of the Google Cloud project that contains the sink.

  2. Examine the FILTER column to see if it includes the LOG_ID("maintenance.googleapis.com/activity_log") filter. If either this filter doesn't appear or there's a broader filter that excludes this log (for example, (NOT LOG_ID("cloudaudit.googleapis.com/activity_log)")), then you customized all sinks to drop logs with the log ID of maintenance.googleapis.com/activity_log.

    To resolve this, you must either create or update a sink to include the maintenance logs. For the --log-filter parameter, specify LOG_ID("maintenance.googleapis.com/activity_log") as the filter.