This document describes how you can display events on your charts. An event is an activity, such as a deployment or a crash, that affects the operation of a system. Showing events can help you correlate data from different sources when you're troubleshooting an issue.
If you configure a dashboard to display events, then as those events occur, the charts on your dashboards are annotated. The following screenshot illustrates a chart that is displaying one annotation, with the tooltip for the annotation activated:
Each annotation can list multiple events. In the previous screenshot, an event for a GKE deployment is listed. For a list of events that can be shown on the charts in a dashboard, see the Event types page.
Before you begin
To get the permissions that you need to view charts and logs, and to create alerts, ask your administrator to grant you the following IAM roles on your project:
View charts and alerts:
Monitoring Viewer (
Monitoring Editor (
View all logs except data access logs that are created in your Google Cloud project:
Logs Viewer (
View data access logs that are created in your Google Cloud project:
Private Logs Viewer (
For more information about granting roles, see Manage access.
For a list of event types, troubleshooting references, and queries that can be use with the Logs Explorer or with log-based alerts, see the Event types page.
To show events, do the following:
In the navigation panel of the Google Cloud console, select Monitoring, and then select Dashboards:
- Select the dashboard that you want to view.
In the dashboard's toolbar, ensure the Events toggle is on.
If the Events toggle isn't displayed, then the dashboard doesn't support the display of events.
For each event type that you want to display, in the dashboard toolbar, click Add event, and then select the event type from the menu.
For example, you might configure your dashboard to to display "GKE Workload Deployment" events.
After you add an event type, Cloud Monitoring queries your log data, which takes a few moments, and then adds the annotations to the charts on the dashboard:
- info Info: An informational message.
- warning Warning: Indicates a failure, such as a reboot or a crash.
- notifications Alert: Indicates that an incident was opened.
To view a summary of an event or to access links to logs, use your pointer to activate the tooltip.
View logs for an event
When you are viewing a chart that is displaying event annotations, you can access the logs associated with the events:
To view logs for a specific event, use your pointer to activate the tooltip for an annotation that lists the event, go to the event, and then click View logs.
To view the logs for all events identified by the annotation, use your pointer to activate the tooltip for the annotation, go to the summary line of the tooltip, and then click View logs.
In another browser tab, the Logs Explorer opens with the query parameters set to query for the specific event, or for the collection of events.
To get notified when an event appears in your logs, configure a log-based alert. Log-based alerts query your logs as they are received. When the query returns a non-empty result, an incident is created and notifications are sent.
To create a logs-based alert, do the following:
If you haven't configured a notification channel, then do the following:
In the navigation panel of the Google Cloud console, select Monitoring, and then select notifications Alerting:
- Click Edit notification channel.
- Go to the type of notification channel that you want to configure, click Add new, and then complete the dialog.
In the navigation panel of the Google Cloud console, select Logging, and then select Logs Explorer:
In the toolbar, select Create Alert.
Enter a name for the alerting policy and then click Next.
In the Define log entries to alert on section, enter a query or update the query that was copied from the Query pane when you selected Create Alert.
For each event type, the Event types page lists a query that is suitable for use in a log-based alert.
Complete the dialog, and then click Save.
To hide all events, in the dashboard toolbar, ensure the toggle_off Events toggle is off.
To hide one type of event, set the toggle for that event type to the off position.
- Share a custom dashboard
- Explore charted data
- Access resource-specific dashboards
- Add temporary filters to custom dashboards
- Add permanent filters to custom dashboards