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


Chapter 7 Working with Network Query : Performing Network Queries

Performing Network Queries
Network query allows you to communicate with multiple TIBCO Hawk agents at one time. Network query feature enables you to ask multiple agents on the network any question which you can ask an individual agent. Agents can be grouped by domains or by the response to a prior question. The query is broadcast to every agent on the network, but only specific agents on the target list process the query and respond.
A network query has some of the same structural elements as a rule. However, parameters are specified dynamically, not stored in a rulebase. In TIBCO Hawk WebConsole, you specify a data source for the query, which is a microagent method with optional arguments. You can also specify an optional test to filter the result set.
The following example performs a network query by invoking the SysInfo:getOperatingSystem method on a agent. It includes a test that checks the OS Name parameter to determine if the agent is running on Linux operating system.
To query remote agents on the network:
1.
Select the Network Query tab from the TIBCO Hawk WebConsole screen. The Network Query screen is displayed.
2.
Go to the Choose Agents panel to select one or more Hawk agents. The list of discovered agents is displayed. Click to expand the domains until a list of individual agents is displayed.
3.
4.
Click Choose Microagent and Method panel. TIBCO Hawk WebConsole looks up microagents and methods for the selected agent, and displays them in the MicroAgent-Method tab.
5.
Select Invoke a method radio button from Choose Microagent and Method panel title bar to invoke a method. This radio button is the default selection.
6.
Select the SysInfo microagent and getOperatingSystem method. This method returns operating system details for the target agents. For instructions on invoking a microagent, see Viewing Microagents and Invoking a Microagent Method.
7.
8.
You can add a test to filter the results of the method invocation. To add a test to a network query, select the Test a condition radio button from Choose Microagent and Method panel title bar. The Test tab is enabled.
9.
Click the Test tab to specify the test parameters. The Test tab screen looks like the following:
 
A test is applied to microagent method results for every agent in the target list. This test expression specified in the above example returns all agents running on Linux operating system. For instructions on building test expressions, Creating a Test.
 
10.
Click Test Condition. While agents are queried, the message Request Sent is displayed in the Query Result column of the results table. It might take several seconds for all agents in the target list to respond.
11.
12.
The status bar displays the number of agents with Success, Error, and Timeout status.
Success: Agents that received the query and responded successfully.
Error: Agents that could not process the query.
TimeOut: Agents that did not respond, usually due to a network problem.
13.
14.
15.
You can mark any agents listed in the results table as the subject of a second query or a network action. Select the agents from the Results section and click Set Targets. The selected agents replace the agents on the target list. The next query or action is sent only to those agents.

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