79124920

Date: 2024-10-25 08:47:55
Score: 1
Natty:
Report link

To filter disk metrics in Google Cloud Platform (GCP) by a custom label, you can follow these steps:

  1. Go to the Google Cloud Console and select your project. In the Navigation menu go to Monitoring>Metrics Explorer.

  2. Filter by Resource Type- A resource type specifies from which resource the metric data is captured. Set the resource type to gce_pd (Persistent Disk).This will allow you to focus on metrics related to your disks.

  3. Select the Metric, the metric type identifies the measurements to be collected from a resource.

    • In the Metrics select like read/write operations and Add Filters for Custom Labels
  4. You can identify the label as follows: Click on “Add filter” and select the appropriate label key you've set.

  5. Set the filter value to my-app, You can choose to aggregate metrics by mean, sum, or count depending on your needs. By adjusting aggregation elements can change the number of time series that your chart displays. The settings in the Aggregation element can change the number of time series that your chart displays.

  6. Choose how to visualize the data and select the time range for the metrics you want to display. Finally, after configuring your filters and visualizations, click on "Save to Dashboard" and also name the widget for easy identification.

For more information refer to this blog by Oscar L Villalon and official GCP document on select metrics using metric explorer and document on metric types.

Reasons:
  • Blacklisted phrase (1): this blog
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Hemanth Kanchumurthy