How to generate the Monthly Usage reports for the Usage Meter running in Offline Mode
search cancel

How to generate the Monthly Usage reports for the Usage Meter running in Offline Mode

book

Article ID: 396744

calendar_today

Updated On:

Products

VMware Usage Meter

Issue/Introduction

You can request the generation of the Monthly Usage report by running a curl command  with the vCloud Usage Meter appliance for offline reporting.

Environment

vCloud Usage Meter 4.8

Cause

This is an informative KB article.

Resolution

In order to generate the reports, take SSH to the usage meter as Root.

NOTE: $ORT_ADDRESS = Customer's Environment FQDN

Request the Monthly Usage report by running the curl command.

curl -k -X POST "https://$ORT_ADDRESS/reports" -H "accept: */*" -H "Authorization: 
Basic $ORT_AUTH_HEADER" -H "Content-Type: application/json" -d "{\"year\":yearnumber,\"month\":month-number}"


The value for year-number must be a positive integer number.
The value for month-number must be a positive integer number between 1 and 12.

Do not add a leading zero to the value of the month. For example, for August  enter the value of 8.

The generation of the report can take up to several hours depending on the size of the product consumption data.

 

Verify the Status for the Monthly Usage Report Generation

You can obtain the status for the monthly usage report generation by running the curl command.

curl -k -X GET "https://$ORT_ADDRESS/reports/year-number/month-number" -H "accept: 
application/json" -H "Authorization: Basic $ORT_AUTH_HEADER"

The command output contains the status of the report generation process, the set of the log files, and the link to the Monthly Usage report and the Virtual Machine History report.

 

Download the Monthly Usage Report

To download the Monthly Usage report, run the curl command.

curl -k "https://$ORT_ADDRESS/resources/year-number/month-number/mur.tsv" -H 
"Authorization: Basic $ORT_AUTH_HEADER" --output month_year_mur.tsv

 

Download the Virtual Machine History Report

To download the Virtual Machine History report, run the curl command.

curl -k "https://$ORT_ADDRESS/resources/year-number/month-number/vmh.tsv" -H 
"Authorization: Basic $ORT_AUTH_HEADER" --output month_year_vmh.tsv

 

Download the Customer Monthly Report

To download the Customer Monthly report, run the curl command.

curl -k "https://$ORT_ADDRESS/resources/year-number/month-number/cmr.tsv" -H 
"Authorization: Basic $ORT_AUTH_HEADER" --output month_year_cmr.tsv

 

Download the Cluster History Report

To download the Cluster History report, run the curl command.

curl -k "https://$ORT_ADDRESS/resources/year-number/month-number/cluster-history.tsv" -H 
"Authorization: Basic $ORT_AUTH_HEADER" --output month_year_cluster_history.tsv

 

Once the reports are downloaded into .tsv format, you can change into .xlsx or.csv format & save a copy and upload to the CPN portal.