Last updated on: 2023-08-29 10:06:08.

Billing Report guide

To obtain resource throughput usage data and generate your VNFM billing report (otherwise referred to in the EULA as, utility billing report), run the Generate Report workflow for the main solution/blueprint deployment only, using one of the following methods:

This workflow merges output from all service layers to calculate the usage data for your specific BIG-IQ registration key every 180 days (default setting). However, you can also run a complete historical report. After running the billing report, send F5 the report in an email.

Prerequisite for running reports

Before executing the Generate Report workflow in your VNFM, verify that your BIG-IQ Virtual Edition 8.2.0.1 instance is running. Currently, BIG-IQ Virtual Edition 8.2.0.1 is the only version supported by VNF Manager. Using different BIG-IQ versions can cause Billing Report workflow failures.

Caution

Generate utility reports on your VNF Manager only. Never manually generate utility reports on your BIG-IQ Virtual Edition 8.2.0.1 machines.

Report using a VNF Manager workflow

  1. In the F5 VNF Manager, click the Deployment blade.

  2. In the main deployment row (the deployment for the actual Gi-LAN, Gi-Firewall, DNS, DNS Security, or CGNAT-Offering solution blueprints defined using the inputs file), expand menuIcon_report, expand the Ric option, and then select the Generate Report workflow from the list.

  3. At the Execute workflow generate_report popup menu, leave the false default value in the full_historical_report text box, and then click Execute. A report will generate for the last 180 days of utility use. If you want to run a complete historical report, change this value to true.

    OPTIONAL: If using an external database, verify the values set when defining the external database parameters, otherwise leave blank.

  4. Once you generate the report, in the left menu, click Generate Report. The Utility Report page displays recently generated report data.

  5. Do one of the following:

    • Click Select report content to select the report text, right-click the selection, and then select Copy from the menu.
    • Click Copy report to clipboard.
    _images/report_deployment_data.png
  6. Paste the content into an email, and then send it to F5 Networks using the vesubscriptions@f5.com email address (listed in your EULA). A link to your EULA is located on the F5 VNF Manager download site.

The frequency of sending generated reports to F5 is based on your EULA agreement/contract with F5 Networks. To find your agreement details, point your browser to the F5 VNF Manager download login site, and then click the EULA link.

Report using the REST API

  1. Use the following code sample to generate and retrieve VNFM billing report using the REST API:

    import requests
    from requests.auth import HTTPBasicAuth
    import time
    
    VNFM_IP = "10.190.55.79"
    VNFM_USERNAME = "admin"
    VNFM_PASSWORD = "admin"
    VNFM_TENANT = "default_tenant"
    VNFM_BASE_DEPLOYMENT_ID = "test_hotfix5"
    # This should be switched to True in a production environment
    VERIFY_VNFM_CERT = False
    
    
    def start_generate_report():
        url = 'https://{}/api/v3.1/executions'.format(VNFM_IP)
        headers = {
            'Content-Type': 'application/json',
            'Tenant': VNFM_TENANT,
        }
        querystring = {'_include': 'id'}
        payload = {
            'deployment_id': VNFM_BASE_DEPLOYMENT_ID,
            'workflow_id': 'generate_report',
        }
        response = requests.post(
            url,
            auth=HTTPBasicAuth(VNFM_USERNAME, VNFM_PASSWORD),
            headers=headers,
            params=querystring,
            json=payload,
            verify=VERIFY_VNFM_CERT,
        )
        print response.json()
        return response.json()["id"]
    
    
    def wait_for_successful_report_generation(id):
        number_of_retries = 10
        interval_between_retries = 2  # seconds
        url = 'https://{}/api/v3.1/executions/{}'.format(VNFM_IP, id)
        headers = {'Tenant': VNFM_TENANT}
        querystring = {'_include': 'status,error'}
        for i in xrange(number_of_retries):
            response = requests.get(
                url,
                auth=HTTPBasicAuth(VNFM_USERNAME, VNFM_PASSWORD),
                headers=headers,
                params=querystring,
                verify=VERIFY_VNFM_CERT,
            )
            response_json = response.json()
            if response_json["status"] == "terminated":
                if response_json["error"] != "":
                    print "generate_report workflow failed"
                return True
            time.sleep(interval_between_retries)
        return False
    
    
    def retrieve_report():
        url = 'https://{}/api/v3.1/node-instances'.format(VNFM_IP)
        headers = {'Tenant': VNFM_TENANT}
        querystring = {'_include': 'id,deployment_id,node_id,runtime_properties'}
        response = requests.get(
            url,
            auth=HTTPBasicAuth(VNFM_USERNAME, VNFM_PASSWORD),
            headers=headers,
            params=querystring,
            verify=VERIFY_VNFM_CERT,
        )
        for item in response.json()["items"]:
            if item["deployment_id"] == VNFM_BASE_DEPLOYMENT_ID and \
                    item["node_id"] == "master_information_collector":
                return item["runtime_properties"]["jsonReport"]
    
    
    id = start_generate_report()
    if wait_for_successful_report_generation(id):
        generated_report = retrieve_report()
        with open("report.json", "w") as report_file:
            report_file.write(generated_report)
    
  2. Copy and paste the report data into an email and send it to vesubscriptions@f5.com.

What’s Next?

Backup and Restore Guide