This document describes how you can use Logs Explorer to view maintenance
activities stored in logs.

To view maintenance activities using the Unified Maintenance API, see
[View resource maintenances by using the API](https://docs.cloud.google.com/unified-maintenance/docs/view-maintenance-api.md.txt).

To view upcoming and historical maintenance activities in Cloud Hub,
see [View maintenance activities](https://docs.cloud.google.com/hub/docs/maintenance.md.txt).

### Before you begin

Before you view maintenance activity logs using Unified Maintenance:

- Verify that Unified Maintenance supports your [resource types](https://docs.cloud.google.com/unified-maintenance/docs/supported-services.md.txt).

> [!NOTE]
> **Note:** Maintenance activity logs generated by Unified Maintenance will contribute to your logs quota. You can use Cloud Logging exclusion filters to selectively turn off consuming the logs for your project. Cloud Logging API quota will still be used.   
> For more information, see [Routing and storage overview](https://docs.cloud.google.com/logging/docs/routing/overview.md.txt).

### View maintenance activity logs

To view maintenance activity logs in Google Cloud console:

1. Go to Logs Explorer. [Go to Logs Explorer](https://console.cloud.google.com/logs)

2. Select the appropriate log timeframe.
3. In the **All log names** drop-down, select `maintenance_events`. A list of existing logs for maintenance activities within your selected timeframe will appear.
4. Click a log to see more details.

   The log fields provide information such as scheduled start and end time,
   actual start and end time, and a description of the activity. If the
   Google Cloud product supports rescheduling or applying an update on-demand,
   `jsonPayload.controls` provides a link to the service provider's
   documentation in the `documentation` field.

   For examples, see [Reschedule or apply an update on demand](https://docs.cloud.google.com/unified-maintenance/docs/reschedule-and-on-demand-updates.md.txt).
   For more information about the maintenance log format, see
   [Log schema overview](https://docs.cloud.google.com/unified-maintenance/docs/log-schema.md.txt).

### What's next

- Use Unified Maintenance to [reschedule or apply an update on demand](https://docs.cloud.google.com/unified-maintenance/docs/reschedule-and-on-demand-updates.md.txt).
- Learn how to [configure alert policies](https://docs.cloud.google.com/unified-maintenance/docs/implement-common-alert-policies.md.txt).
- Learn how to [configure alerts and notifications](https://docs.cloud.google.com/unified-maintenance/docs/configure-alerts-and-notifications.md.txt) based on different webhooks.
- See the Unified Maintenance [log schema](https://docs.cloud.google.com/unified-maintenance/docs/log-schema.md.txt) for more information about reading logs.