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


Chapter 8 The TIBCO Hawk Event Service : Executing Commands on Loss of Agent

Executing Commands on Loss of Agent
If TIBCO Hawk agent process is terminated by user or abnormally due to loss of network communication, HAWK Event Service can be configured to execute a script or set of programmatic instructions. Such script could also send an e-mail or text message providing instant notification.
This configuration is facilitated in Hawk Event Service Configuration file (hawkevent.cfg) via “-script” parameter.
By default, this is not enabled. To execute a command script on loss of agent, you need to provide the fully-qualified name of an executable file in hawkevent.cfg. and enable it by uncommenting (removing “#” from the beginning of line) that parameter.
For example, –script <fully-qualified name of an executable file>
An example of script file providing the notification message is as follows.
Hawk Event Service can provide the following arguments in this order:
1.
2.
For example, for an agent running on Microsoft Windows, a script named sendpage.bat might contain the following lines:
 
@echo off
rem Usage - sendpage.bat <agentname> <agent_ipaddress>
send_page.exe %1 %2
exit
You could also call a script that logs into the machine and checks for the existence of an agent process before sending notification.

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