Automating reports

Table of contents

No headers

HPE Consumption Analytics Portal’s batch reporting enables administrators to automate the running of reports. This feature is useful for month-end invoicing or any other situation where automatic generation and delivery of reports is required. You have the option to schedule batch reports.

The batch reporting system is tightly coupled with the User and User Group system. Part of the function of a user group is to define which customers a particular user group is allowed to view. Users are tied to this user group that enables them to view reports for the specified users. Batch reporting leverages this same list to generate reports on a per-user group basis (the list of user groups is passed down to the job at run time). The generated reports are subsequently emailed to the users associated with the relevant user groups.

A working SMTP server is required for batch reporting. This server must be configured, via HPE Consumption Analytics Portal, using the SMTP configuration form. There is currently no other mechanism for retrieving batch reports. For more information, see Accessing SMTP.

In general, batch reporting proceeds as follows:

Identify the report or reports to be run and ensure that it runs properly through HPE Consumption Analytics Portal.

Create a named User Group and specify which customers and views the user group is allowed to see.

Create one or more users and assign them to the relevant user group.

Create a job using the run_report sample as a template. In this job, you can specify the report to be generated, the parameters that will be passed down to the report (such as account ID ranges, reporting level, date range, etc), and the output format.

When it is time to generate the report, run the job, either from the command line or using a schedule. The list of User Groups is provided at this time, as a parameter to the batch process.

The batch system runs the relevant reports based on the parameters defined in the job and the customers defined in the User Group.

An email is generated for each user in each user group. The subject and contents of the email are based on Velocity email templates stored in HPE Consumption Analytics Portal’s base directory. The report is attached as an email attachment.

The emails are queued up and transmitted. Success/fail status is available through HPE Consumption Analytics Portal in the Batch Monitoring page (see Monitoring job results.)