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


Appendix B Troubleshooting and Frequently Asked Questions : Troubleshooting and FAQs

Troubleshooting and FAQs
The following sections section provides answers to some commonly asked questions about TIBCO Hawk:
Alerts
How can I isolate the alerts for one agent into their own log file?
You can track information specific to one agent, microagent or application by writing this information to a log file in an action that is part of a rule. To do this, set up a rule that retrieves specific information (such as free disk space), give it a test that always evaluates to true, and write the important information to a log file. For example, you might create a rule with the data source Performance: LogicalDisk: percent free Space (Microsoft Windows) or file system: getByPartition: percent free (Unix) to be collected every five minutes. The rule might have a test such as percent free != -1 which would always be true. The test might have an action such as echo logfile.dat (which would be prefixed in Microsoft Windows with cmd /c). This would append information on free disk space to a specific log file.
Platform: Not Specified
Version: All
Why did the log parser fail?
If TIBCO Hawk alert or notification messages contain line feed characters, a log file parser cannot properly evaluate the TIBCO Hawk Event Service file, Event.dat. The line feed characters are usually derived from parameter variable substitution from the following microagents:
Avoid using line feed characters in alert or notification messages. If line feed characters cannot be avoided, use the Console API to evaluate alerts and notifications containing line-feeds. You can also use the Hawk 4.1 Event Service microagents in lieu of directly reading Event.dat.
Configuring Agents
Do I need to run both the HMA and the agent?
Yes, the HMA provides system-specific microagents that could be used in monitoring system resources such as cpu utilization, disk space usage, or process instance count. The agent depends on HMA and other microagents to provide its own set of non-platform-specific microagents which allows the execution of custom scripts or programs and log file monitoring.
Platform: Not Specified
Version: All
How do I notify someone if the agent dies?
Use event service and provide it with a script to send an e-mail (or page) to an administrator. When an agent's heartbeat is not received by the event service, it executes the script specified at start-up, providing it with two arguments (first argument being the hostname of the dead agent and the second argument being the dead agent's IP address).You may create the script to accept one or both arguments.
Platform: Not Specified
Version: All
How can I create my own microagents?
By Instrumenting your application with TIBCO Hawk Application Management Interface (AMI) API in your application.
Refer to the TIBCO Hawk Programmer's Guide for further details. The sample AMI API code provided in HAWK_HOME/examples/ami_api may help you in understanding the concepts and getting started.
Platform: Not Specified
Version: All
Error messages
When I try to open a Solaris rulebase on a Microsoft Windows machine, I get the message "Invalid Microagent ... Unable to construct Test Editor"
Some rulebases are platform-independent whereas some rulebases are platform-independent.
When editing a rulebase, all of the microagents used within that rulebase must be loaded locally in the agent (or the repository's host agent) used as the editing platform. Otherwise, the agent does not have access to the necessary descriptors.
Platform: Not Specified
Version: All
When you open a rulebase loaded by an agent, you can look at all of its rules. However, you cannot choose a data source that is unavailable to that agent, and you cannot edit tests that rely on unavailable data sources. Why?
If you want to examine or change rules whose data sources are not available from the machine on which you are using the TIBCO Hawk Display, interact with an agent located on a machine on which the data sources are available. For example, if you have Microsoft Windows and Solaris machines in your network and you want to examine a Solaris rulebase from a Microsoft Windows machine, select an agent running on a Solaris machine, choose 'Get RuleBases', and examine or change the rules there.
Platform: Not Specified
Version: All
Why is the Application Event Log full of performance DLL errors?
Under certain conditions the TIBCO Hawk Performance Microagent can cause the Application Event Log to fill rapidly with messages similar to:
"The open procedure for service "htpps4.1" in DLL e:\netscape\server\bin\htps\nsctr.dll failed. Performance data for this service is not available. Status code returns DWORD0 1008".
This error occurs whenever a Microsoft Windows service's performance DLL (service htpps4.1 in this case) fails to load. Each failed load also causes the application (Hawk HMA) to leak memory. The problem lies in the Microsoft Windows performance counter libraries. To fix this problem, rename the DLL listed in the error message.
Platform: Microsoft Windows 2000   
Version: All
The Microsoft Windows Performance API reports errors regarding counter values that cause mathematical errors in performance statistics calculations.
The Microsoft Windows Performance API is driven by a set of Microsoft Windows and third-party extension DLLs, which implement the various performance objects and associated counters. These extension DLLs may occasionally return counter values that cause mathematical errors in performance statistics calculations. These errors are reported by the Microsoft Windows Performance API. For example:
Error Code Error Text
0x8000078D8 A counter with a negative value was detected.
0x8000078D6 A counter with a negative denominator was detected.
These errors are reported by HMA for information purposes. The errors are not caused by HMA. They are caused by bugs or design flaws in the associated extension DLL.
Platform: Microsoft Windows
Version: All
Why do I get an error when I call a method of my instrumented application?
Check that the message descriptor in your describeMethods return messages that match up exactly with the messages returned by your methods. If the identifiers do not match, an error is returned. See the TIBCO Hawk Programmer's Guide for further details.
Platform: Not Specified
Version: All
What does a NoDataSource error mean?
This type of error means that a rule attempted to obtain information from a data source that did not exist at the time of the rule evaluation and the specified information could not be obtained.
If the HMA process is running, there may be some reason why the communication between the agent and the HMA is upset.
Rules that operate on applications instrumented with AMI can only work when the application is running.
Platform: Not Specified
Version: All
Command Lines and Process Names
I can’t use a quoted string as a command argument in UNIX.
On UNIX, quoted strings with embedded blanks cannot be passed as command arguments to UNIX shell scripts by means of the Custom::execute, Custom::executeForNumber and Custom::executeForString methods. The Java Virtual Machine (JVM) parses these strings as blank delimited tokens and passes them as separate arguments.
To work around this, utilize a shell script as the executable. Pass all arguments that do not contain spaces first. Then use the "shift" shell command and a wildcard argument variable, "$*", to pass the space containing argument at the end.
I'm trying to execute a command line using custom: execute, and it won't work -- but when I shorten the command line it works. What should I do?
This is a known problem because some operating system shells limit the size of command lines that can be passed to them. To get around this problem, write a script with the long command line, and call that script from the custom:execute method.
Platform: Not Specified
Version: All
Why can't I match long process names?
When using the process:getProcess method (UNIX) or performance: ProcessCount method (Microsoft Windows), you may find that process names longer than a certain length cannot be matched exactly. This limit on process names comes from the operating system functions used to collect this information.
There are several workarounds to the limitation of process names:
Use regular expressions to match process names. For example, to find process abcdefghijklmn you might search for the regular expression abcdef.* .
Invoke the Process::getProcess method with no arguments to view the supported process name length.
Use the Process::getIntancesByCommand method to match on the process's Command string.
The full command is not returned by my operating system. What do I do?
In the Process::getProcess and Process::getInstanceCountbyCommand methods, the full command may not be returned. The command is truncated to between 55 and 80 characters, depending upon the operating system, and contains the same information as the ps -ef utility. To get the full command, use a script that utilizes the UCB ps utility (for example, /usr/ucb/ps -auxww | grep -c mycommand) in conjunction with Custom::executeForNumber().
Methods
When I start a GUI process with the method custom:execute in the Microsoft Windows environment, the process only runs in the background. How can I cause such a process to run in the foreground?
To start a process you want to run in the foreground, create a utility that the TIBCO Hawk agent can invoke with custom:execute and pass it the process you want to execute in the foreground. This utility is responsible for setting all the permissions required to start and display the GUI application.
Custom: execute run in the foreground on a system wide basis by changing how the TIBCO Hawk agent service is configured. Follow these steps:
1.
2.
3.
4.
All processes spawned by the TIBCO Hawk agent are now in the foreground.
Platform: Not Specified
Version: All
I call a script using the method custom:executeForNumber(executeForString), but the microagent terminates the script before it is finished because it takes too long. What should I do?
Here are a few possibilities. Note that your script has to return within 10 seconds.
Platform: Not Specified
Version: All
Why do I get a negative ID Process or ID Thread number?
When subscribing to Process/Thread methods on the performance microagent, the ID Process or ID Thread column may display a negative number other than -1. This is not an error; the negative number signifies that this particular instance of Process/Thread no longer exists and this row is taken out in the next subscription interval. In this case, -1 as a Process ID is reserved for Process instance _Total, and -1 as a Thread ID is resolved for Thread instance  _Total/_Total.
Rulebases
How many rules can you have in a rulebase? How many rulebases can you load onto an agent? How many alerts can you generate?
There is no theoretical limit to the number of rules you can have in a rulebase or the number of rulebases a TIBCO Hawk agent can process. However, you may experience a practical limit in terms of memory use, speed, and operating system limitations such as the maximum number of open files per process.
Platform: Not Specified
Version: All
If I use one rulebase across many computers, can I disable some rules on some computers?
You might think that turning on and off rules would be a good way to adapt a rulebase for use on many slightly different computers. However, it presents a problem. If you could disable rules on individual agents, any rulebases distributed across the network would remove those differences, because the rulebases would still have the same names.
One of the most important parts of planning your monitoring effort is deciding how rules must be organized into rulebases and how rulebases are to be distributed over your network. Rulebases can range from very general (for example, all_computers) to very specific (for example, important_app). You might have a set of rulebases you can mix and match to meet the specific needs on each computer.
So if you need to tailor rulebases to specific computers, we suggest that you first look at what functions those computers are performing and how those functions can be organized into rulebase distributions. If you find that you have completely individual needs for each computer, the best approach is to design a rulebase with a unique name that corresponds to that computer.
Platform: Not Specified
Version: All
What rulebases are available with the TIBCO Hawk monitoring software?
The TIBCO Hawk software provides OS-specific rulebases for the platforms supported by it, as well as agent and RV rulebases. You can find all these rulebases stored under HAWK_HOME/examples/rulebases where HAWK_HOME is the directory where the TIBCO Hawk software is installed.
Platform: Not Specified
Version: All
Why does the Posted Condition display as PostedConditionExist?
In the Rulebase Test Editor, if PostedCondition is specified as ${Posted.x} > 0 and saved, it is displayed by the Test editor as PostedConditionExist when you reopen the rulebase. Both of these represent the same expression. Similarly, ${Posted.x} == 0 is displayed as !PostedConditionExist.
When I use the external variable such as ${External.testvar}in rulebase action type execute or method:Custom:Execute on Microsoft Windows platform, while variable file is specified as for example: testvar=c:\temp\abc.bat, it does not work. What's wrong?
In the Microsoft Windows environment, when you specify the variable file which contains a directory path, instead of specifying
 
testvar=c:\temp\abc.bat
you should use forward slash or another backward slash to escape the '\', such as:
 
testvar=c:/temp/abc.bat
or
 
testvar=c:\\temp\\abc.bat
And this would solve the problem.
Platform: Windows
WebConsole
Why do I get the following exception when I start TIBCO Hawk WebConsole with the persistence mode set to false in web.xml file?
org.h2.jdbc.JdbcSQLException: Connection is broken
To resolve this issue, comment the <Resource> tag that points to H2 database from context.xml file in HAWK_HOME/webconsole/tomcat/webapps/hawkwebconsole/META-INF folder to work in no database mode.

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