This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.7.2. 每小时和每日测量集群容量
以下报告演示了如何每小时和每日测量集群容量。每日报告通过汇总每小时报告的结果来实现。
以下报告会每小时测量集群的 CPU 容量。
集群的每小时 CPU 容量示例
apiVersion: metering.openshift.io/v1 kind: Report metadata: name: cluster-cpu-capacity-hourly spec: query: "cluster-cpu-capacity" schedule: period: "hourly"
apiVersion: metering.openshift.io/v1
kind: Report
metadata:
name: cluster-cpu-capacity-hourly
spec:
query: "cluster-cpu-capacity"
schedule:
period: "hourly"
- 1
- 您可将周期设置为
每日
,获取每日报告,但对于较大数据集,建议使用每小时报告,然后通过汇总每小时报告来获取每日报告。
以下报告通过汇总每小时数据来获取每日报告。
集群的每日 CPU 容量示例
apiVersion: metering.openshift.io/v1 kind: Report metadata: name: cluster-cpu-capacity-daily spec: query: "cluster-cpu-capacity" inputs: - name: ClusterCpuCapacityReportName value: cluster-cpu-capacity-hourly schedule: period: "daily"
apiVersion: metering.openshift.io/v1
kind: Report
metadata:
name: cluster-cpu-capacity-daily
spec:
query: "cluster-cpu-capacity"
inputs:
- name: ClusterCpuCapacityReportName
value: cluster-cpu-capacity-hourly
schedule:
period: "daily"