Cloud Monitoring provides performance monitoring, metrics, and uptime checks, along with alerts to send notifications when certain metric thresholds are exceeded. Google Cloud Observability pricing applies. Note that you can also use Cloud Monitoring custom metrics.
Knative serving is automatically integrated with Cloud Monitoring with no setup or configuration required. This means that metrics of your Knative serving services are captured automatically when they are running.
You can view metrics either in Cloud Monitoring or in the Knative serving page in the console. Cloud Monitoring provides more charting and filtering options.
Resource types
The monitoring resource name for Knative serving is
Knative serving Revision (knative_revision
) .
Viewing metrics in Knative serving
To view metrics in Knative serving:
Go to Knative serving in the Google Cloud console:
Locate the service in the services list, and click on it.
Click the Metrics tab to show the metrics for that revision.
Viewing metrics in Cloud Monitoring
To view the metrics for a monitored resource by using the Metrics Explorer, do the following:
-
In the Google Cloud console, go to the leaderboard Metrics explorer page:
If you use the search bar to find this page, then select the result whose subheading is Monitoring.
- In the Metric element, expand the Select a metric menu,
enter
Knative serving Revision
in the filter bar, and then use the submenus to select a specific resource type and metric:- In the Active resources menu, select Knative serving Revision.
- To select a metric, use the Active metric categories and Active metrics menus. For a full description of the available metrics, see:
- Click Apply.
To remove time series from the display, use the Filter element.
To combine time series, use the menus on the Aggregation element. For example, to display the CPU utilization for your VMs, based on their zone, set the first menu to Mean and the second menu to zone.
All time series are displayed when the first menu of the Aggregation element is set to Unaggregated. The default settings for the Aggregation element are determined by the metric type you selected.
- For quota and other metrics that report one sample per day, do the following:
- In the Display pane, set the Widget type to Stacked bar chart.
- Set the time period to at least one week.
Adding Uptime checks
You can use Cloud Monitoring to keep track of your services' performance. For more information, see Verify availability of your service(uptime checks).
Adding Alerts
You can use Cloud Monitoring to send notification about certain
events, such as uptime check failures. For more information, see
Create and manage alerting policies for your service.