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


Chapter 4 Monitoring Console : Using the Monitoring Archive Utility

Using the Monitoring Archive Utility
The monitoring archive, MAR file, contains one or more monitoring configurations. A monitoring configuration is a TIBCO Hawk rulebase template.
The MAR utility converts TIBCO Hawk rulebases into templates so that they can be deployed to any target within any TIBCO Administrator domain. A rulebase template, in a MAR file, has the extension .hrt.
The rulebases can contain two types of rules:
These rules use the data source of the microagents belonging to TIBCO applications, such as TIBCO BusinessWorks or TIBCO Adapters. Each of these applications have an unique type.
These rules do not use the data source of the microagents belonging to TIBCO applications.
If a rulebase contains multiple application-specific rules, the MAR utility splits a single rulebase into multiple rulebases where each rulebase contains rules with the data source from the same adapter type. The name of the templatized rulebase will be suffixed the type of the TIBCO application. For example, if the rulebase myRulebase.hrb contains rules using the microagents belonging to TIBCO ActiveMatrix BusinessWorks (of type bwengine) and TIBCO Adapter for Active Database (of type adb), then the resulting rulebases will be myRulebase-bwengine.hrt and myRulebase-adb.hrt.
If a rulebase contains only agent-specific rules, the rulebase is not split into separate rulebases and neither is the rulebase name suffixed with any type. If you want the name of such a rulebase to be assigned a specific type, use the -Xtype option when creating the monitoring archive file.
If the rulebase contains one or more agent-specific rules and one or more application-specific rules, the rulebases are split into agent-specific and application-specific rulebases. For example, if the rulebase myMixedRulebases.hrb contains rules using the Logfile microagent and microagents belonging to TIBCO ActiveMatrix BusinessWorks (of type bwengine) and TIBCO Adapter for Active Database (of type adb). The resulting rulebases will be myMixedRulebases.hrt, myMixedRulebases-bwengine.hrt, and myMixedRulebases-adb.hrt.
The MAR utility will convert any six part data source to a seven part data source in the input rulebases.
For Example, if the data source in a rulebase is: COM.TIBCO.ADAPTER.<NAME>.<TIBCO_DEPLOYMENT>.<TIBCO_COMPONENT_INSTANCE>,
the MAR utility will convert this data source to the following:
COM.TIBCO.ADAPTER.<NAME>.<TIBCO_DOMAIN>.<TIBCO_DEPLOYMENT>.<TIBCO_COMPONENT_INSTANCE>.
The MAR utility, mar, is located in the CONFIG_FOLDER/hawk/bin directory. The MAR utility requires TIBCO Runtime Agent 5.5.4 to be installed.
Using the MAR utility you can:
To create a MAR file, use the command
    mar c[v]f <marfilename> <inputfiles> [-Xoptions]
    mar c[v]df <description> <marfilename> <inputfiles>     [-Xoptions]
Examples:
This command creates a MAR file myMarFile.mar that contains all rulebases in the current directory.
This command creates a MAR file myMarFile.mar that contains all rulebases in the current directory and includes the provided description.
This command creates MAR file myMarFile.mar of type adb and contains two rulebases adb.hrb and agent.hrb.
This command creates a MAR file myMarFile.mar that contains all rulebases in the current directory but without converting into them into rulebase templates.
To update a MAR file, use the command
    mar u[v]f <marfilename> <inputfiles> [-Xoptions]
    mar u[v]df <description> <marfilename> <inputfiles>     [-Xoptions]
Example:
This command add the rulebase newRB.hrb to the existing MAR file, myMarFile.mar.
To extract a MAR file, use the command
    mar x[v]f <marfilename> <inputfiles> [-Xoptions]
    mar x[v]pf <propertiesfile> <marfilename> <inputfiles>     [-Xoptions]
Example:
This command extracts the rulebase testRB.hrb from the specified MAR file. Any other rulebase contained in the MAR file is not extracted.
This command extracts the rulebase testRB.hrb from the specified MAR file and substitute the variables in the rulebase using the key-value pair specified in myprop.properties file.
Any other rulebase contained in the MAR file is not extracted.
Following are the contents of a sample properties file used for variable substitution:
      TIBCO_DOMAIN=MyHawkdomain
      TIBCO_DEPLOYMENT=myDeployment
      TIBCO_COMPONENT_INSTANCE=myComponentInstance
To extract a MAR file, use the command
    mar t[v]f <marfilename>
Example:
This command lists all rulebases contained in the specified file.
The following table describes the input parameters and options for the MAR utility.
If the d option is specified, you have to provide a description. In the command, the options d and f must appear in the same order as the description and MAR file.
If the p option is specified, you have to specify the properties file. In the command, the options p and f must appear in the same order as the properties file and MAR file.
-Xtype <type>,
The MAR utility recognizes the datatype of any rule in a rulebase whose datasource name is in the following format: COM.TIBCO.ADAPTER.<NAME>.<TIBCO_DEPLOYMENT>.<TIBCO_COMPONENT_INSTANCE> or COM.TIBCO.ADAPTER.<NAME>.<TIBCO_DOMAIN>.<TIBCO_DEPLOYMENT>.<TIBCO_COMPONENT_INSTANCE>.
The following table lists valid values for some TIBCO applications that you can use when assigning a type to the MAR file.
 
 

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