Unable to generate usage metering report based on schedule
search cancel

Unable to generate usage metering report based on schedule

book

Article ID: 248342

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM) CA Unified Infrastructure Management On-Premise (Nimsoft / UIM) CA Unified Infrastructure Management SaaS (Nimsoft / UIM)

Issue/Introduction

We are not getting a report using usage_metering probe when we tried to schedule the report and even when tried to run immediately with the help of run scan now option.

Environment

  • Release: DX UIM 9.2.0, 20.4 CU3
  • Component: UIM - USAGE_METERING/BILLING
  • usage_metering v9.28, 9.31

Cause

- unclear documentation

Resolution

1. Ensure the probe has the java min/max memory set under startup->options in the probe via Raw configure, as 2048 and 4096 respectively.

    These values may need to be set higher in large environments.

2. Deactivate usage_metering.

3. Then Activate it.

4. After the 'Run Scan' process is complete, run a billing report for the given year and chosen month, e.g., August 2022.

    Year     Month

     2022     08

5. Then press the 'Refresh' button.

6. Select a Report in the window.

7. Click Export. The billing calculation (HTML) report will be downloaded.

8. You can then view the HTML report.

Below is an example billing report with some sensitive fields purposely hidden/blocked:

Additional Information

Notes on the 'Device Metering Schedule'
 
When you configure/enable the Device Metering Schedule, e.g., every hour, it simply runs in the background to collect metering statistics that feed the billing calculation report.

  • 'Run Scan Now' allows you to force a device metering (query) to be run manually. Then you can also generate and view the billing reports which are stored in the usage_metering probe /reports directory.
  • To reiterate, when you configure/enable the Device Metering Schedule, e.g., every hour, it simply runs in the background to collect metering statistics that feed the billing calculation report. There is no separate report or output. If you'd like to test it, schedule it for a few minutes in the future, and then check the log.


For example, as per the usage_metering log output, you can clearly see that the usage metering scan for billable resources runs every hour based on the defined (configurable) schedule - see below.

Line 38593: Sep 15 01:35:00:018 INFO  [pool-7-thread-1, com.nimsoft.nimbus.service.probe.usage_metering.device_metering.DeviceUsageScanMainThread] usage metering collection starting. semaphore lock acquired

Line 38786: Sep 15 02:35:00:034 INFO  [pool-7-thread-1, com.nimsoft.nimbus.service.probe.usage_metering.device_metering.DeviceUsageScanMainThread] usage metering collection starting. semaphore lock acquired

Line 38979: Sep 15 03:35:00:026 INFO  [pool-7-thread-1, com.nimsoft.nimbus.service.probe.usage_metering.device_metering.DeviceUsageScanMainThread] usage metering collection starting. semaphore lock acquired

Line 39172: Sep 15 04:35:00:029 INFO  [pool-7-thread-1, com.nimsoft.nimbus.service.probe.usage_metering.device_metering.DeviceUsageScanMainThread] usage metering collection starting. semaphore lock acquired

Line 39365: Sep 15 05:35:00:015 INFO  [pool-7-thread-1, com.nimsoft.nimbus.service.probe.usage_metering.device_metering.DeviceUsageScanMainThread] usage metering collection starting. semaphore lock acquired

etc...

 
 
For generating billing reports which are monthly, you MUST run the calculation reports Ad Hoc / manually. They are written to the usage_monitoring probe /reports directory.

You'll also see that more data is stored in the usage_metering h2 db, e.g., usage_metering.h2.db file size increases, after the scheduled scan has finished.

Other notes related to usage_metering:

webgtw probe: usage_monitoring reports cannot be uploaded via the webgtw automatically now, so this probe may be deleted since it does not serve any other purpose internally.

billing probe: billing functions were merged into the usage_metering probe therefore, this probe can also be removed (as of UIM 20.3).