If you don’t know what the use of TIBCO hawk and how it’s working please read https://techieswiki.com/what-is-tibco-hawk-and-how-does-it-works.html to get a fair idea.
In this post, I am going to explain on few names which will be helpful while creating the hawk monitoring rules.
- Variables
Like in programing language, in hawk also we have two types of variables. Internal and External variables. As the name suggests internal variables are predefined one which we can’t modify or delete. For example Agent Name [ ${Internal.Agent Name} ] is an internal variable which will return the agent name i.e the server name.
As you expected, External variables are the user-defined variables. To define the external variables we need to specify the location of the file in the hawkagent.cfg file which is located under<tra>/domain/<domain>/
If TRA hawk agents have been used. If standalone Hawk agents have been used, hawkagent.cfg should be located in the folder.<cfgmgmt>/hawk/bin
We need to restart the TRA to take effect the edit we made in the config file. The format of the variable file is one line per variable where each line has the format “<variable_name>=<value>”-variables "C:/tibco/config/hawk/variables.dat"
Once we create the file with the variables, we need to invoke updateExternalVariable function under RulebaseEngine micro agent. Or restart of TRA will also do the work. Once this is done we can use the external variables in the rule bases which we create. The format will be like ${External.<Variable Name>}
- SchedulesSchedules are used to set a time frame for the rules. It has both include and exclude time periods which is helpful to enable/disable the monitoring at specific time frames. We can create as many schedules based on our need.
- RuleBasesRuleBases are the once which monitor the components like Integrations, EMS or DB and perform certain actions based on our configurations. RulesBases are in XML format which has the extension .hrb. here hrb stands for Hawk Rule Base. Unlike integration, we need to follow some pre-step to configure the monitoring for EMS or DB as the microagent for this functionality is not bundled with the hawk. Read How to configure Tibco EMS microagent to understand more about this.
- Microagents
Microagents are basically java methods which will generate the output based on the input which we give. There are many microagents are available by default which will help us to configure the rulebase for monitoring. An e.g. is
FileStat: As the name implies this Microagent will return the file details. This microagent has multiple methods available to get the details of a file or directory.1. getFileStatus: – This method returns status information for the directory(s)/file(s) contained in the specified directory whose names match the specified input.2. getFileCount: – This method returns the count of a directory(s)/file(s) contained in the specified directory whose names match the specified input.
These are the few basic things you should aware of before start creating a RuleBase for monitoring. We will discuss more these in the coming sessions.