|
The Custom Reporting feature enables you to perform customization of the reports and channels on the appliance. Configuration FilesThe reporting facilities and selection of UI channels shown on each page are configured using xml configuration files which are held in the following directories:
The directories are parsed in the order given (installed before custom), and the files contained in these directories are parsed in alphabetical order, with numbers before letters. This order is important as later definitions for a named report override those loaded earlier. The standard base reports are contained in /usr/tideway/data/installed/reports/00reports.xml. This data layout has changed in Tideway Foundation 7.2. Upgrades from previous versions of Tideway Foundation move the /usr/tideway/data/customer/reports.xml configuration file to /usr/tideway/data/custom/reports/00reports.xml. The configuration is read when the UI process starts. Changes to the report configuration files require a UI restart. If either configuration file contains errors, the appserver service is unlikely to start. Note: You cannot add context sensitive reports to the discovery status page. The root element of each reports.xml file must be <reports> with no attributes. The <reports> element can have the following optional child elements:
<report> elementsThe <report> element requires the following attributes:
Multiple kinds can be specified in a comma separated list or by using the * wildcard. The immediate child elements of the <report> element must not have attributes. The <report> element can have the following optional child elements:
Interactive parameters are defined using <parameter> elements. These have the following attributes:
Report parameters add fragments to the where clause of the search string. The fragment is defined by the content of a <where> child element of the <parameter> element. The reports system inserts the value of the parameter using string substitution with a key of value. For example, if the where fragment for a parameter is name HAS SUBSTRING '%(value)s' and you enter a value of foo then name HAS SUBSTRING 'foo' is added to the where clause of the search string.
If the type attribute is SelectField, the <parameter> element requires an <options> child element containing one or more <option> elements. Each <option> element contains the text used to label that option in a drop-down control and an optional value attribute that supplies the value to be used in the where clause. If the value attribute is not supplied the text content is used. <parameter name="DQ_Report_Global_type" title="Type" type="SelectField"> <where>kind(#)='%(value)s'</where> <options> <option value="Host">Host</option> <option value="SoftwareProductVersion">Software Product Version</option> <option value="BusinessApplicationInstance">Application Instance</option> </options> </parameter> Alternatively, SelectField parameter elements can have a <query> child element surrounding a search query string that, when executed, provides the set of options for the parameter. <parameter name="Library_report_SPTByName_type" title="Type" type="SelectField"> <where> #ModelNode:OntologyLink:OntologyNode:OntoSoftwareProductType.#ElementInCategory:ElementCategory:Category:OntoSoftwareCategory.name='%(value)s' </where> <query> SEARCH OntoSoftwareCategory WHERE name IS DEFINED ORDER BY name SHOW name </query> </parameter> SelectField parameters automatically have an All choice added to the top of the list. <extrareport> elementsThe <extrareport> elements are similar in function to report elements but enable you to create more sophisticated reports. Each <extrareport> element has the following attributes:
<parameter> elementExtra reports' interactive parameters are defined using <parameter> elements. These have the following attributes:
The result of this parameter is substituted into the query where its replacement construct appears. If the key parameter is not present, the result is substituted, with other parameters with no key attribute, where the %(cond)s construct appears.
The context in which it is evaluated makes certain functions and constants available, including the contents of common.timeutil, which includes: currentTime(), convertToUnix(), and ONE_DAY. It is valid for parameter types that are not SelectField. The Python function eval should be able to evaluate the expression.
The function can also be a lambda function taking one parameter, for example lambda n: "name HAS SUBSTRING '%s'" % n, in this case, the value is substituted into the relevant place in the string. If the type is string, then the characters inside the <template> element should be a string that contains a single %s. This string is applied to the value of the field using the % operator. This is a shorthand for the previous example that used a lambda.
<import> elementThe <import> element defines an import needed to reference a function used in the <template> child element of the <parameter> element. The package and/or module is specified between the opening and closing tag of the element. All packages and modules in Tideway Foundation are available, along with the standard libraries. <default> elementThe <default> element defines a default value that is global to the <extrareport>. This appears as a condition in the query if a parameter does not provide a value. The attribute key is used to match against the key attribute in the <parameter> elements. The characters between opening and closing tag define the string value. <chart> elementsThe <chart> element requires the following attributes:
Adding Drill-Down to Custom ChartsWhen viewing a chart, you can drill-down into any part of that chart to see the details for that particular section. <chart name="DataCentreStand.Reports.WindowsVersionEditionPie"
report="DataCentreStand.Reports.WindowsVersionEditionChart"
type="pie"
title="Windows Version [Edition] Distribution">
<x-axis>_|Windows Version [Edition]|_</x-axis>
<y-axis>_|Hosts|_</y-axis>
</chart>
Below, the drilldown element has been added that shows the SUMMARY for the nodes in the set: <chart name="DataCentreStand.Reports.WindowsVersionEditionPie"
report="DataCentreStand.Reports.WindowsVersionEditionChart"
type="pie"
title="Windows Version [Edition] Distribution"
drilldown="SUMMARY">
<x-axis>_|Windows Version [Edition]|_</x-axis>
<y-axis>_|Hosts|_</y-axis>
</chart>
For more information see Using Chart Reports. The <chart> element has the following child elements:
<chart name="Infrastructure.Chart.HostOSType" report="Infrastructure.Report.HostOSTypeChart" type="column" title="Hosts by OS Type Chart"> <x-axis>_|OS|_</x-axis> <y-axis>_|Hosts|_</y-axis> </chart> <report-channel> elementsThe <report-channel> element requires the following attributes:
<page> elementsThe <page> element requires the following attribute:
Built-in ChannelsThe following built-in channels are defined:
In addition, there is a built-in channel called Reports.Channel.CustomReports that links to all the reports defined in the customer reports.xml file. This channel is only intended for development and testing purposes. Built-in Page NamesThe following are the identifiers for pages with configurable content:
|
