Loadbalance.xml: Catch-all phase is usually recommended to be placed at the bottom of the list.

Document ID : KB000043233
Last Modified Date : 14/02/2018
Show Technical Document Details

 Introduction/Summary:

 When using loadbalancing.xml, a catch-all phase is usually best to be used at the bottom of the list.

 

 Background:

 When using loadbalancing.xml, sometimes it would produce unexpected results.  The ordering of the agent-collector plays a crucial role.  The agent-collectors are  considered in order from top to bottom of the list.

 

 Environment:

 By using loadbalancing.xml, we want to prevent all agents from connecting to a particular collector.  In addition, we would like to direct certain agents to be connected to a particular set of collectors.

 

 Instructions:

  If I use catch-all agent-collector on the top in the following example, it would have the unintended effect of excluding ALL agents from connecting to the specified  collector, but at the same time it would connect ALL the agents to ANY collectors other than the specified one, rendering the second agent-collector at the bottom not executed (because the catch-all would have connected all agents to a collector already): 

 

<agent-collector name="CatchAll Exclude"> 

<agent-specifier>.*\|.*\|.*</agent-specifier> 

<exclude> 

<collector host="collectorExcluded" port="1234"/> 

</exclude> 

</agent-collector>

<agent-collector name="Agents Include"> 

<agent-specifier>Agent Server\|Application\|.*</agent-specifier> 

<include> 

<collector host="collectorIncluded" port="5678" /> 

</include> 

</agent-collector> 

 

 Recommended Solution:

 However, if using the catch-all agent-collector at the bottom, then the specific agent can first connect to the specified collector.  Then ANY and ALL other agents would be connected to collectors EXCEPT the collector specfied in the catch-all.

 

<agent-collector name="Agents Include"> 

<agent-specifier>Agent Server\|Application\|.*</agent-specifier> 

<include> 

<collector host="collectorIncluded" port="5678" /> 

</include> 

</agent-collector> 

 

<agent-collector name="CatchAll Exclude"> 

 

<agent-specifier>.*\|.*\|.*</agent-specifier>

<exclude> 

<collector host="collectorExcluded" port="1234"/> 

</exclude> 

</agent-collector>