Skip navigation
Currently Being Moderated

8.3 Designing an Ad Hoc Report

VERSION 19  Click to view document history
Created on: Oct 12, 2011 11:51 AM by Zenoss API - Last Modified:  Oct 12, 2011 12:02 PM by Zenoss API

 3. Designing an Ad Hoc Report

This section discusses basic functionality of the Ad Hoc Editor. Read to learn about:

  • Selecting report content

  • Formatting table appearance

  • Viewing and running a report in the editor


The Ad Hoc Editor also is helpful for exploring and analyzing data; for more information, see the section titled "Exploring and Analyzing Data in the Ad Hoc Editor."

 3.1. Selecting Report Content

To design a table in the Ad Hoc Editor:

  1. From the Analytics Getting Started page, click Create a Report.

    The Topics and Domains window appears.


    Figure 8.2. Topics and Domains Window

    Topics and Domains Window

  2. On the Domains tab, expand Organizations in the hierarchy, and then select a Domain.

  3. Select Table, and then click Open Report.

    The Ad Hoc Editor appears, showing available fields (in the left panel).


    Figure 8.3. New Ad Hoc Report

    New Ad Hoc Report

  4. At the top of the table (Click to Add a Title), click in the area and enter a title for the report, and then press Enter.

  5. In the list of available fields, click to add desired fields (columns) to the report.

    Data for each field appear as you add columns to the table.


    To change the list of fields available to the report, click (select...). From the Change field selection dialog, you can select additional fields from the Available list.

    To view report data in chart form, click the Chart tab.

  6. Select Save the Report from to save the report.

    • In the Report Name field, enter a report name.

    • Accept the default value for Location Folder, or click Browse to select a new location.

    • In the Description field, optionally enter a description for the report.

 3.2. Formatting Table Appearance

A range of options are available to change the appearance of a table. You can change:

  • Report style (colors)

  • Group and column labels

  • Column width

  • Spacing (add "spacers")

  • Data format

  • Detail view

To format a table in the Ad Hoc Editor:

 3.2.1. Edit Report Style

To change report style:

  1. In the Search field, enter the saved report name, and then click Search.

    The Search page appears, displaying objects matching the entered text.

  2. In the Repository pane, right-click the report, and then select Open in Designer from the options menu.

    The report appears.

  3. Click to select a report style.


    Figure 8.4. Styles Window

    Styles Window

  4. Select a style, and then click Close.

 3.2.2. Change Group and Column Labels

To change the label for a group or column:

  1. Right-click the group or column name, and then select Edit Label from the options menu.


    Figure 8.5. Edit Label

    Edit Label

    The label becomes editable.

  2. Enter a new label, and then press Enter.


    If space is at a premium, you can remove labels from the report and make a column only as wide as the data.

 3.2.3. Resizing Columns

To resize a column:

  1. Click a column header.

    Borders appear on the column.

  2. Move the cursor to the column edge until the resize arrows appear, and then drag the border left or right.

    The column resizes to the selected size.

 3.2.4. Adding Spacers

You can use spacers to create margins. To add a spacer, click next to the Spacer selection in the list of fields.

 3.2.5. Editing Data Format

To change the format of data in a column:

  1. Right-click the column.

    The options menu appears.

  2. Click to expand the Change Data Format selection.

    A list of available data formats appears.


    Figure 8.6. Available Data Formats

    Available Data Formats

  3. Select a data format option.

    The table refreshes to show the data in the newly selected format.

 3.2.6. Displaying Detail View

You can choose to display only summarized totals for each group in a table. Select Hide Detail Rows from to toggle between showing and hiding detail rows.

 3.3. Create Ad Hoc Report: Example

The following example shows how to create an ad hoc report. It illustrates how physical server resources are used, and more specifically, how resource usage changes over time for a server. The value of this chart is that it allows you to determine if additional capacity is required by looking at the trends. You will select a single server and create column charts showing one month of data for CPU utilization, which is always between 0% and 100%.

Steps in this example include:

  • Inspecting the MySQL database

  • Creating a Domain

  • Creating an ad hoc report

 3.3.1. Inspect the MySQL Database

This optional step allows you to test queries and determine a strategy for creating the Domain and ad hoc report.

  1. Locate a device that has CPU data:

  2. Examine the data for that device:

  3. There are gaps in the data that need to be removed. The dim_date table has all dates. "LEFT JOIN" includes all dates, even if there is no data.

    The previous query is used to derive a table against which to join dim_date.

 3.3.2. Create a Domain

Filtering by date range and averaging of CPU utilization values is done when creating an ad hoc report. Therefore, the Domain that is created will resemble this SQL query:

  1. View the repository.

  2. Ctrl-Click to add a domain to the Zenoss > Domains folder.

  3. Launch the Domain Designer. In the wizard, make selections or enter information as follows:

    • Tables - Enter dim_date.

    • Derived Tables - Click New, and then paste in the following lines:

      SELECT device_name, date_key, cpu_pct_value
          FROM fct_cpu__pct
          JOIN dim_device USING (device_key)
           WHERE device_name="test-ubuntu804.zenoss.loc'

      Click Run, and then Create.

    • Joins - Choose dim_date.date_key on the left, and jdbc_query_1.date_key on the right. Click (Join Left Outer).

    • Display - Select date_date, cpu__pct_value, and device_name, and then click Add Selected. Change the labels to Date, CPU Utilization, and Device.

 3.3.3. Create an Ad Hoc Report

This ad hoc report will be a chart; however, choose Table, which allows you to more easily drag and drop fields before switching to Chart.

Build the ad hoc report by using the Ad Hoc Editor:

  1. From the Domains tab, select a domain, select Table, and then click Choose Data to launch the editor.

  2. Make selections and enter data to define the report:

    • On the Data panel, select Date, CPU Utilization, and Device, and then click Next.

    • On the Filters panel, click Date, and then click New Condition. In the Comparison column, select "Is After." In the Value column, select last month's date, and then click OK.

    • On the Filters panel, click Date, and then click New Condition. In the Comparison column, select "Is On or Before." In the Value column, select today's date, and then click OK.

  3. Click Open Report.

  4. Drag Date to the center of the report.

  5. Drag CPU Utilization into the space to the right of the newly displayed dates.

  6. Click the Chart tab.

    The data appears in chart form.

  7. Right-click the chart, and then select Change Summary Function > Average.

 3.4. Viewing and Running a Report in the Editor

When you have created a table, chart, or crosstab, you can save it in the repository for future use. In the Ad Hoc Editor, you can:

  • View the report in presentation mode. Click .

  • Run the report by clicking . You also can run the report directly from the repository. (See the topic titled "Running a Simple Report.")

Comments (0)