You are on page 1of 6

HAWK:

How to create a HAWK rule base.

First right click on the server and select Get Configuration \ Rulebases.

Then click on create.


Then create a Name for the rulebase.
Next click on Create.
Click on Edit.

Then select TIBCORuntimeAgent and getComponentInstanceStatus.


Deployment and Component Instance variables are dependant on the component you are
trying to monitor.
After you have filled out the information you should click OK.

Next you need to click Create next to Tests.


Click on Edit.

Then select Parameter / Operator and Argument(s).

After you have those fields filled out click Compound.


Next click AND and select Parameter / Operator and Argument(s) and click Apply.

Next click on Create.


Click Edit.
Then select Method

For Deployment and Component Instance insert the same values you had earlier. Click
OK.

Click Create again.

Select Email next and fill in all information. The only information that will need to be
changed is the Subject and Content line to match the component you are monitoring.

Now click ok until you get back to the screen below. Then click on Apply Changes.

Next Click on Send Selected To, and select the server that has the component.
After that you should be done.

How to add a TIBCO Hawk Rulebase to an Application?

1. Generate Rulebase according to previous steps.

2. Login to TIBCO administrator using your credentials.

In TIBCO Administrator, click Application Management.

3. Select the application for which the rulebase has been defined, and expand it.

4. In the Configuration Builder pane, click the service or process name for which
the rulebase has been defined. A service is named with a .arr suffix. A process is
named with a .par suffix.

5. Click the Monitoring tab.

6. In the Rulebases panel, click Add.

7. Click Browse and in the window that appears, navigate to the directory where
the rulebase is stored and select the rulebase. Click OK.

8. Click Save.

When you deploy the service, TIBCO Hawk Agent saves the rulebase file in the
<install-path>\tibco\tra\domain\<domain-name>\rulebase folder.
When the conditions specified in the rulebase occur, the results display in the
Resource Management > Machines View Machine panel.

Difference between microagent and hawk agent.

micro agent is simple program that is for each process that is running the tibco
world, which provides details/controls to that process, where hawk agent utilizes
all these micro agents.

Example of hawk functionality:

For example: A process is tacking 30 miniutes in idle situation. now we have


configured that if it runs more then 45 minutes send mail to administrator. it runs
more then 1 hour kill process and send notification to user , administrator.Start
this agent when process started.

There is another agent which i continuously monitoring which process are runing
on system.

The monent you start process agent activates that process started and monitoring
starts.

this is functanility of HAWK.

How to start Tibco Administrator using Hawk Rule

First create a batch filec

Below is the steps in the batch file

@echo off
cd C:\tibco\administrator\5.1\bin
tibcoadmin_domainname.exe

Save the file as StartAdminServer.bat

Next Step is to write a hawk rule

Click Process Mircoagent and Select getInstanceCountByCommand() Method

Enter Your domain name executable tibcoadmin_domainname.exe

click ok
Then go Test Condition

Click create
Process count < 1

Click oK

Action1

Click High Level Alert then type as Tibco Admin is Stopped, choose allways radio
button

Action 2

Click Create

Select Execute Button

cmd /c start C:\lOCATIONOF BATCH FILE\StartAdminSserver.bat

Action 3

Click create

Select Notification button and set message as Trying to start Administrator server

click Advanced and select Always


ok

Create Test 2 in the same hawk rule

Process count >=1

ok

Create Action

Choose Notification Type and say Tibco Aadmin is Running

click ok

Adding EMS server to Hawk display and Monitoring it from HAWK DISPLAY

The following procedure should be used to Add Ems Server to Hawk display
check where Ems Server is installed
Go to Tibco admin domain and click service instances
check for Ems server and the machine on which it is installed

Go to c:\tibco\ems\clients\java\tijmsadmin.jar
Go to c:\tibco\ems\samples\admin\hawk\tijmsadmin.hma

copy these files to desktop


Edit tibjmsadin.hma
change the username of Ems Server
change the password of Ems Server
change the url of ems server which can be found under
<arg>-server</arg>
<arg>tcp://ITLP012A:1020</arg>
Remove the commenting, if not then it would be pointing to default url which is
Tcp://localhost:7222

Save it and exit

Copy the jar and hma file from desktop to the machine where Ems Server is
installed
Place these 2 files in the following directories
<<TIBCO_HOME>>/tra/domain/<<DOMAIN_NAME>>/plugin
<<TIBCO_HOME>>/hawk/lib

Kill the hawk agent and restart it

Go to Hawkdisplay and you can see all the machines that are added

Go to ITLP012A
Right click on it and say get microagents
You can see a Microagent called JMS_controller(tcp://ITLP012A:1020)
Select the above agent and select the methods and do invoke them .
Next step would be writing hawk rule bases , since you have added succesfully
Ems Server to hawk display.

Note;You may also need a custom microagent called Ems-ping for this .

Common Mistakes while doing this are


coping the files from desktop to the location /apps/tibco/tra/domain/domain-
name/plugins
You will encounter permission issues
So you copy the files from Desktop to /var/tmp/
Then execute this command
chmod 777 tib*
Now you can copy files from /VAR/TMP/
cp /var/tmp/tib* /apps/tibco/tra/domain/domain-name/plugins.

Another issue would be starting hawk agent which can be done as

nohup hawkagent_domainname &


then press enter
again press enter

Hawk agent should start

To kill ps -fu username (The username under which /apps/tibco/tra) is installed


You will get all the process running under this user

Search for the hawk agent you are looking and


Execute command
kill -9 hawkagent_domainname

Default hawk micro agents:

The TIBCO Hawk Agent interfaces the managed objects on its local machines
using microagents. Each microagent provides the agent a set of methods it uses to
collect information and take action.

The default micro agents included in the installation of TIBCO Hawk are:

1. Self microagent - gathers the version information for the local agent and
available microagents.
2. Custom microagent - executes any command-line executables that can run on
the current machine.
3. Log file microagent - responds asynchronously each time a new line is added to
the log file.
4. Process microagent - counts the instances of the process on the agent and
returns the process usage statistics.
5. FileStat microagent - gathers information on a disc file or files on the agent
machine.
6. SysInfo microagent - gathers the basic information about the system ie; the
system name, IP address, Operating system.
7. Rendezvous microagent - gathers information in the TIBCO Rendezvous
daemon activity on the current machine.
8. RuleBaseEngine microagent - gathers information about the rulebases and
takes actions on rulebases that affect the TIBCO Hawk agent.

You might also like