How to generate rulebase for all appnode based on template

How to generate rulebase for all appnode based on template

book

Article ID: KB0075011

calendar_today

Updated On:

Products Versions
TIBCO Hawk 5.2, 6.x

Description

Background: mar utility can be used for BW5 application and it can generate individual rulebase file for each application based on template file, however, this utility doesn't support BW6.
 

Issue/Introduction

how to generate rulebase for all appnode based on template

Resolution

For BW6, customer can utilize the tool attached to this article to generate individual rulebase file for each appnode based on the template file.

Steps to run the tool:

1. Copy createRulebaseBW6.jar to $TIBCO_HOME/tibcojre64/1.8.0/bin

2. Prepare template rulebase and use GV like %%TIBCO_DOMAIN_NAME%% %%TIBCO_APPSPACE_NAME%% %%TIBCO_APPNODE_NAME%% in template rulebase, these GV will be replaced with actual value after run the tool. Please refer to a sample template ruelbase file attached to this article.

3. Run command like below, where domainhome is the BW domain path, and template is the template file.
java -cp <classpath> createRulebaseBW6 -domainhome <BW6 domain home> -template <template rulebase file>

for example:
java -cp C:/tibco/tibcojre64/1.8.0/bin/createRulebaseBW6.jar;C:/tibco/hawk/6.0/lib/config.jar;C:/tibco/hawk/6.0/lib/talon.jar;C:/tibco/hawk/6.0/lib/util.jar; createRulebaseBW6 -domainhome C:/tibco/bw/6.4/domains/d1 -template C:/tibco/tibco/cfgmgmt/hawk/template/monitorApplicationBW6.hrb

4. New rulebase files will be created under the same directory with template rulebase, and it will create rulebase file for each of the appnode under specified domain home.

5. Copy new generated rulebase to autoconfig folder of hawkagent.

Attachment to this article:
createRulebaseBW6.jar
monitorApplicationBW6.hrb   ------------  sample template rulebase with GV
startApplication.bat  ------------- sample script to start application for appnode (used in template rulebase for Windows)

Note:
1. This utility works for both Linux and Windows. Please adjust the path in java command when run it on Linux.
./java -cp /opt/tibco/tibcojre64/1.8.0/bin/createRulebaseBW6.jar:/opt/tibco/hawk/6.0/lib/config.jar:/opt/tibco/hawk/6.0/lib/talon.jar:/opt/tibco/hawk/6.0/lib/util.jar: createRulebaseBW6 -domainhome /opt/tibco/bw/6.4/domains/d1 -template /opt/tibco/tibco/cfgmgmt/hawk/template/monitorApplicationBW6.hrb
2. .bat script attached is for Windows, customer should prepare .sh script for Linux.
3. From HKBW6 6.6.1, new Hawk method StartBWApplication and StopBWApplication are introduced, these methods could be used to start / stop application (instead of using script).

Please contact TIBCO Support if any further questions.

Attachments

How to generate rulebase for all appnode based on template get_app
How to generate rulebase for all appnode based on template get_app
How to generate rulebase for all appnode based on template get_app