Generate consumption-based billing reports with the metrics-utility
The Ansible Automation Platform metrics utility tool (metrics-utility) is a command-line utility that is installed on a system containing an instance of automation controller.
When installed and configured, metrics-utility gathers billing-related metrics from your system and creates a consumption-based billing report. The metrics-utility tool is especially suited for users who have multiple managed hosts and want to use consumption-based billing. After a report is generated, it is deposited in a target location that you specify in the configuration file.
metrics-utility collects two types of data from your system: configuration data and reporting data.
The configuration data includes the following information:
- Version information for automation controller and for the operating system
- Subscription information
- The base URL
The reporting data includes the following information:
- Job name and ID
- Hostname
- Inventory name
- Organization name
- Project name
- Success or failure information
- Report date and time
To ensure that metrics-utility continues to work as configured, clear your report directories of outdated reports regularly.
- Configure the metrics-utility
Configure themetrics-utilityto gather and report usage data for your Ansible Automation Platform, both on Red Hat Enterprise Linux and OpenShift Container Platform. - Configure a monthly usage report
You can fetch a monthly report from Ansible Automation Platform to gather usage metrics and create a consumption-based billing report. To fetch a monthly report on Red Hat Enterprise Linux or on OpenShift Container Platform, use the following procedures: - Configure the metrics-utility to run at specific times
You can configuremetrics-utilityto run at specified times and intervals. Run frequency is expressed in cronjobs. For more information on the cron utility, see How to schedule jobs using the LinuxCronutility. - Specify where to store consumption-based reports
Supported storage is available for storing the raw data obtained by using themetrics-utility gather_automation_controller_billing_datacommand and storing the generated reports obtained by using themetrics-utility build_reportcommand. - Configure options for the Certified Cloud and Service Provider report (CCSPv2)
Additional configurations for data gathering and report building based on a report type. Apply the environment variables to each report type based on your Ansible Automation Platform installation. - Configure options in the RENEWAL_GUIDANCE report
TheRENEWAL_GUIDANCEreport provides historical usage from the HostMetric table, applying deduplication and showing real historical usage for renewal guidance purposes. - Original Certified Cloud and Service Provider (CCSP) report
CCSPis the original report format. It does not include many of the customization of CCSPv2, and the intention is only to use it for the CCSP partner program. - How to deduplicate host data in reports
Deduplication changes howmetrics-utilitymerges individual host records into countable managed nodes when building reports. Deduplication identifies identical hosts to ensure an accurate count of unique hosts.