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.12.4. Knative Serving のメータリングレポート
Report
リソースを作成し、Knative Serving に対してメータリングレポートを実行できます。レポートを実行する前に、レポート期間の開始日と終了日を指定するために、Report
リソース内で入力パラメーターを変更する必要があります。
YAML ファイル
apiVersion: metering.openshift.io/v1 kind: Report metadata: name: knative-service-cpu-usage spec: reportingStart: '2019-06-01T00:00:00Z' reportingEnd: '2019-06-30T23:59:59Z' query: knative-service-cpu-usage runImmediately: true
apiVersion: metering.openshift.io/v1
kind: Report
metadata:
name: knative-service-cpu-usage
spec:
reportingStart: '2019-06-01T00:00:00Z'
reportingEnd: '2019-06-30T23:59:59Z'
query: knative-service-cpu-usage
runImmediately: true
12.4.1. メータリングレポートの実行
以下のコマンドを入力してレポートを実行します。
oc apply -f <report-name>.yml
$ oc apply -f <report-name>.yml
Copy to Clipboard Copied! 以下のコマンドを入力してレポートを確認できます。
oc get report
$ oc get report
Copy to Clipboard Copied! NAME QUERY SCHEDULE RUNNING FAILED LAST REPORT TIME AGE knative-service-cpu-usage knative-service-cpu-usage Finished 2019-06-30T23:59:59Z 10h
NAME QUERY SCHEDULE RUNNING FAILED LAST REPORT TIME AGE knative-service-cpu-usage knative-service-cpu-usage Finished 2019-06-30T23:59:59Z 10h
Copy to Clipboard Copied!