1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/metering-cluster-usage-examples.adoc
2020-02-05 20:50:03 +00:00

28 lines
1.0 KiB
Plaintext

// Module included in the following assemblies:
//
// * metering/metering-usage-examples.adoc
[id="metering-cluster-usage-examples_{context}"]
= Measure cluster usage with a one-time Report
The following Reports to measure cluster usage from a specific starting date forward. The Report only runs once, after you save it and apply it.
.CPU usage by cluster example
[source,yaml]
----
apiVersion: metering.openshift.io/v1
kind: Report
metadata:
name: cluster-cpu-usage-2019 <1>
spec:
reportingStart: '2019-01-01T00:00:00Z' <2>
reportingEnd: '2019-12-30T23:59:59Z'
query: cluster-cpu-usage <3>
runImmediately: true <4>
----
<1> To stay organized, remember to change the name of your Report if you change any of the other values.
<2> Configures the Reports to start using data from the `reportingStart` timestamp until the `reportingEnd` timestamp.
<3> Adjust your query here. You can also measure cluster usage with the `cluster-memory-usage` query.
<4> This tells the Report to run immediately after saving it and applying it.