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.
If TIBCO Hawk alert or notification messages contain line feed characters, a log file parser will not be able to 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.
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.
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 will execute 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.
Please 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.
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 will not have access to the necessary descriptors.
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.
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.
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:
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.
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 up, an error will result. Please refer to the TIBCO Hawk
Programmer's Guide for further details.
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.
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.
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.
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.
|
•
|
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.
|
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().
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 will be responsible for setting all the permissions required to start and display the GUI application.
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 will be 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.
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.
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 will be organized into rulebases and how rulebases will be distributed over your network. Rulebases can range from very general (e.g. all_computers) to very specific (e.g. important_app). You will probably find that you end up with 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.
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.
In the Rulebase Test Editor, if PostedCondition is specified as
${Posted.x} > 0 and saved, it will be displayed by the Test editor as
PostedConditionExist when you reopen the rulebase. Both of these represent the same expression. Similarly,
${Posted.x} == 0 will be displayed as
!PostedConditionExist.
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.