监控仪表板上 GCS 存储桶子目录的对象计数
Object count for GCS bucket subdirectory on monitoring dashboard
我想知道我是否可以为 GCS 存储桶中的子目录 'Object count' 创建图表。理想情况下,我想使用 'Group by' 选项。这似乎是不可能的。有没有其他方法可以为存储桶子目录的 'Object count' 创建图表?
Google 监控中对象计数的指标是 defined as:
Total number of objects per bucket, grouped by storage class. [...]
因此,如果您想创建一个指标来计算存储桶子文件夹中的对象数量,您可以:
列表项
- 创建 Custom Metric
- 创建 script that list and count the objects
- Write the data in the Custom Metric
- 完成后,您可以使用这些信息创建图表。