Creating domains
A domain is a metadata layer that provides a business view of the data accessed through a data source. A domain presents the data in business terms appropriate to your audience, and can limit the access to data based on the security permissions of the user who runs the report. You can use a domain to create reports and ad hoc views. Analytics ships with several out-of-the-box domains, and you can create your own domains based on business needs.
Before you create a domain, review the following considerations and recommendations. For more information about creating domains, see the JasperReports Server User Guide, Release 6.x.
In practice, you should plan domain features before you begin the creation process. You will use the zenoss_reporting data source for your domain creation. Decide on the elements of your design:
- tables and columns to choose
- joins to perform
- filters to define
- sets you need
- item properties to expose to users
Finally, determine a security policy for the data retrieved through the domain. To help you in your creation of domains, we have included an ERD diagram that shows the relationships between tables in the database. You will also find a sample of some dynamically created dimension tables as well as a flow of performance fact data as it goes through hourly and daily aggregation.
To create a new domain:
- Log in to Analytics as Administrator or superuser.
- Click Create > Domain. The Add New Domain screen is displayed.
- Enter the name, resource ID, and description.
- Select a Save Location by browsing to your organization's Domain folder.
- In the Data Source field, browse to the zenoss_reporting data source located at /organizations/zenoss/Data_Sources/zenoss_reporting.
- In the Domain Design section, click Create with Domain Designer. The Domain Designer screen is displayed. On this screen, you will configure the various aspects of the design.
-
Click the corresponding tab and enter information for the following:
- Tables - Select all tables whose columns you want to use in the domain, either directly or indirectly.
- Derived Tables - Enter queries whose results appear as derived tables in the domain.
- Joins - Define inner and outer joins between all tables and derived tables.
- Calculated Fields - Enter expressions whose results appear as calculated fields. An example of a calculated field can be found in the IP Interface Inventory domain in the Zenoss/Domains folder. Note that the _deleted calculated fields are based on whether the time stamp is present.
- Pre-filters - Specify conditions on field values to limit the data that is accessed through the domain. An example of a pre-filter can be found in the Daily Device KPI domain in the Zenoss/Domains folder. You cannot use this domain if you have components. Thus, there is a pre-filter defined as component_key = 0.
- Display - Organize the visual aspects of the domain and change the display properties of tables, columns, sets, and items exposed to domain users. The properties are located in the far-right column. The Label is the friendly text display, while the ID is the system name that should not be changed unless there are similar IDs coming from different input controls. In the Summary Function section, all performance metrics are defined as measures, while everything else in the system (including time) is defined as a field.
- As you create your domain, click Check Design to validate your domain design. If you have issues, click Export Design, which will create an XML file of your schema that can be shared with Zenoss Support.
- Click OK once you have finished with the Domain Designer. You will return to the Edit Domain screen.
- If all the information is correct including your design, click Submit to add the domain to the repository.