You can write your own stylesheets to customize or filter the XML stream as needed for your configuration. It is a good idea to study a sample stylesheet before modifying it or creating a new stylesheet.
If a stylesheet takes parameters, you can append those parameters to the relative URL path. If the parameters contain special characters (such as a space), follow the standard encoding rule for URLs. For example, enter the parameter
Interface Name as
Interface+Name. You can pass a null value.
|
|
All stylesheets must be in the HAWK_HOME/webconsole/tomcat/webapps/http/xsl directory. If you reference a stylesheet that is not in this directory, the server returns an error.
|
This stylesheet creates a tabular format containing all agents in a given state, specified by the
AgentState parameter value of
1,
2,
3 or
4. The parameter value is received by the
TIBHawkXml servlet and then passed to the XSLT transformation engine.
The following line from the AgentState.xsl file identifies this parameter:
The following code fragment selects all Agent nodes whose RuleBaseEngineState element has the value specified by the parameter
AgentState in the relative URL (text bold for emphasis):
The following relative URL specifies the AgentState.xsl stylesheet, retrieves all agents across all configured Hawk domains which are in state 4 (high alert), and displays the information in tabular format:
The following relative URL specifies the AgentState.xsl stylesheet, displays all agents across all configured Hawk domains which are in state 3 (medium alert), and displays the information in tabular format:
This stylesheet retrieves all alerts of a given severity for a given agent. It has one required parameter,
AgentName, and one optional parameter,
AlertState. If
AlertState is not specified, the stylesheet assumes RuleBaseEngine state 4 (high alert).
The following example specifies the AgentAlert.xsl stylesheet and retrieves all state 3 (medium) alerts for the agent
qaaix03 (text bold for emphasis):
The following example specifies the AgentAlert.xsl stylesheet for the agent
qaaix03. Because the
AlertState parameter is not included in the relative URL, the default alert state of 4 is used and all high alerts are retrieved (text bold for emphasis):
The following relative URL specifies the ClusterView.xsl stylesheet, retrieves all agents in the
SOLARIS cluster, and displays the information in tabular format (bold text for emphasis):
The following relative URL specifies the RuleBaseAlert.xsl stylesheet, retrieves all alerts resulting from the
AgentLogMonitor-UNIX rulebase in all agents in all configured Hawk domains, and displays the results in tabular format (bold text for emphasis):
This stylesheet provides an example of generating data in a different format. It generates, in XML format, all loaded rulebases in a given agent. The XML data can be used by any XML-aware application.
The following relative URL specifies the RuleBaseList.xsl stylesheet, retrieves all rulebases in the
qaisol03 agent, and retrieves the results in XML format (bold text for emphasis):
This stylesheet removes the namespace prefix th from all elements and attributes that are namespace qualified with the URI
http://www.tibco.com/TIBCOHawk. For more information about namespace, see
TIBCO Hawk HTTP Adapter and XML Namespaces.
This stylesheet is useful when working with parsers that are not namespace aware. After you apply this stylesheet to the data, these parsers can process the data.
This stylesheet creates a tabular format listing all alerts of a given state from all agents within a given domain. The
AgentState parameter value can be
1,
2,
3 or
4 to indicate the RuleBaseEngine state of the Hawk Agent.
The following relative URL specifies the Alerts.xsl stylesheet, retrieves all state 3 (medium) alerts from all agents in all configured Hawk domains, and displays the information in tabular format (bold text for emphasis):
This stylesheet is an example of repackaging data in a different format. It adds a new root element called
startscrape and removes the namespace declaration from all elements and attributes that are namespace qualified with the URI
http://www.tibco.com/TIBCOHawk. For more information about namespace, see
TIBCO Hawk HTTP Adapter and XML Namespaces.
This is the default stylesheet used when the Style parameter is not specified in the relative URL. It displays the XML content without filtering, formatting or transforming the original content, and can be used for debugging.
This stylesheet presents method invocation and subscription data in tabular format. It allows you to present the data in any form or format required by an application, such as an HTML application.