Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 8 Setting Deployment Options : Adding a Custom Rulebase to a Process or Service

Adding a Custom Rulebase to a Process or Service
The TIBCO Hawk agent monitors managed objects by processing rulebases, which are named collections of rules that contain management logic. Using TIBCO Hawk Display, you can create rulebases with specialized rules. (TIBCO Hawk Display is not included in TIBCO Runtime Agent). Hawk allows you to specify a very large number of alert conditions and alert results. You must have purchased the full TIBCO Hawk product to create TIBCO Hawk rulebases.
The same rulebase can be loaded on a single service, or multiple services.
Multiple rules defined in the same rulebase can monitor a particular application or system function. For example, an application rulebase could include one rule for issuing a medium-level alert if disk space or CPU usage exceeds certain thresholds. Another rule could issue a high-level alert and send a pager message to the system administrator if the application process terminates.
To Add a Custom Rulebase to an Application
This section provides information about adding a rulebase for a service or process. Information about building the rulebase expression is not provided. See the TIBCO Hawk Administrator’s Guide for information about creating rulebases. The guide is part of the TIBCO Hawk documentation set.
1.
In TIBCO Administrator, click Application Management.
2.
3.
4.
Click the Monitoring tab.
5.
6.
Click Browse and in the window that appears, navigate to the directory where the rulebase is stored and select the rulebase. Click OK.
7.
Click Save.
For example, the next diagram shows the rulebase section for a process archive.
Figure 43 Adding a Custom Rulebase to an Application
When you deploy the service, TIBCO Hawk agent saves the rulebase file in the TIBCO_HOME/domain/domain/rulebase folder. The original rulebase can be safely removed, because the rulebase has been loaded into the domain. If you change the original rulebase, it must be reloaded into the service and the application must be redeployed.
When the conditions specified in the rulebase occur, the results display in the Resource Management > Machines View Machine panel. For example, the next screen shows several alerts that have been generated based on a rulebase.
Figure 44 Results Displayed When Conditions Specified in the Rulebase Occur
How to Create a Custom Rulebase
You can create rulebases using the TIBCO Hawk Display rulebase editor. The rulebase file name can be saved without using a naming convention (as was necessary in releases prior to 5.3). TIBCO Hawk agent creates the appropriate rulebase name and file when the service instance to which the rulebase is assigned is deployed.
For example, if two rulebase files are created and named:
And the above rulebase files are assigned to two service instances (as described in the previous section).
When the D1-Process_Archive service is deployed, TIBCO Hawk agent creates the following rulebase files for the service.
Similarly, when the D1-Process_Archive-1 service is deployed, TIBCO Hawk agent creates the following rulebase files for the service:
The rulebase file names for each instance are stored in an external property file so the TIBCO Hawk agent knows where to re-load the rulebase files if it is restarted.
Rulebase file names are stored in the TIBCO_HOME/tra/domain/domain/startup/application.properties file in the rbList property.
TIBCO Hawk agent assumes that the input rulebase file name provided when uploading a rulebase file uses the .hrb extension. If there is no file extension, Hawk Agent appends .hrb to the rulebase file during deployment.
Variable Substitution
You can assign certain variables to a rulebase and TIBCO Hawk agent will substitute values for the variables when the application is deployed. Variable substitution is typically used in a rulebase to change the data source from pointing to a specific service instance to point a generic service instance.
The following variables are supported by TIBCO Hawk agent:

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved