您可以通过各种方法配置 MOM 代理负载平衡属性。 这些配置示例提供了代码示例:
以下示例显示了如何配置将名为 MyAgent 的代理分配给端口 5001 上名为“myhost”的收集器。
<agent-collector name="Assign MyAgent to One Collector Example">
<agent-specifier>.*\|.*\|MyAgent</agent-specifier> <include>
<collector host="myhost" port="5001"/>
</include>
</agent-collector>
以下示例显示了如何配置 latched 属性,其中:
<agent-Collector name="Latch when Collector Unavailable Example">
<agent-specifier>.*\|.*\|EPAgent.*</agent-specifier> <include>
<Collector host="newCollector-ip" port="6001" latched=”true” /> <Collector host="Collector1-ip" port="6001" /> <Collector host="Collector2-ip" port="6001" />
</include>
</agent-Collector>
以下示例显示了如何分配代理,其中:
<agent-collector name="Allow EPAgents on Two Collectors and One is Preferred Example">
<agent-specifier>.*\|.*\|EPAgent.*</agent-specifier> <include>
<collector host="localhost" port="5001" latched="true"/> <collector host="localhost" port="5002"/>
</include>
</agent-collector>
以下示例显示了如何分配代理,其中:
<agent-collector name="Allow EPAgents on Four Collectors and Two are Preferred Example">
<agent-specifier>.*\|.*\|EPAgent.*</agent-specifier> <include>
<collector host="localhost" port="5001" latched="true"/> <collector host="localhost" port="5002"/> <collector host="localhost" port="5003" latched="true"/> <collector host="localhost" port="5004"/>
</include>
</agent-collector>
以下示例显示了如何从名为 MyHost 的收集器排除名为 MyAgent 的代理。
<agent-collector name="Exclude MyAgent from a Collector Example">
<agent-specifier>.*\|.*\|MyAgent</agent-specifier> <exclude>
<collector host="MyHost" port="5001"/>
</exclude>
</agent-collector>
以下示例显示了如何从多个收集器排除多个代理。
<agent-collector name="Exclude Two Agents Assigned from Two Collectors Example>
<agent-specifier>.*\|.*\|MyAgent.*</agent-specifier> <agent-specifier>.*\|.*\|MyOtherAgent.*</agent-specifier> <exclude>
<collector host="MyHost" port="5001"/> <collector host="MyOtherHost" port="5001"/>
</exclude>
</agent-collector>
以下示例显示了如何将多个代理分配给多个收集器。
<agent-collector name="Two Agents Assigned to Two Collectors Example>
<agent-specifier>.*\|.*\|MyAgent.*</agent-specifier> <agent-specifier>.*\|.*\|MyOtherAgent.*</agent-specifier> <include>
<collector host="MyHost" port="5001"/> <collector host="MyOtherHost" port="5001"/>
</include>
</agent-collector>
下列示例显示了如何将名为 EPAgent 的代理分配给群集中的收集器,其中:
注意,要将代理分配给 host1 和 host2,MOM 会使用默认通信信道端口,且 loadbalancing.xml 也有此要求。
<agent-collector name="Allow EPAgents on Two Collectors in the Same Cluster Example">
<agent-specifier>.*\|.*\|EPAgent.*</agent-specifier> <include>
<collector host="host01" port="5001"/> <collector host="host02" port="5001"/>
</include>
</agent-collector>
下列示例显示了如何将名为 EPAgent 的代理分配给不同群集中的收集器,其中:
注意,要将代理分配给 host1 和 host2,MOM 会使用企业管理器通信信道端口的特定 EPAgent,且 loadbalancing.xml 也有此要求。
下列示例显示出,在代理使用直接套接字连接连接到收集器时,如何将 EPAgent 分配给在不同群集的收集器。
<agent-collector name="Allow EPAgents on Two Collectors in Different Clusters - Direct Socket Connection Example">
<agent-specifier>.*\|.*\|EPAgent.*</agent-specifier> <include>
<collector host="host01" port="5001"/> <collector host="host02" port="5001"/>
</include>
</agent-collector>
下列示例显示出,在代理使用 HTTP 连接到收集器时,如何将 EPAgent 分配给在不同群集的收集器。
<agent-collector name="Allow EPAgents on Two Collectors in Different Clusters - HTTP Example">
<agent-specifier>.*\|.*\|EPAgent.*</agent-specifier> <include>
<collector host="host01" port="8081"/> <collector host="host02" port="8081"/>
</include>
</agent-collector>
下列示例显示出,在代理使用 HTTPS 连接到收集器时,如何将 EPAgent 分配给在不同群集的收集器。
<agent-collector name="Allow EPAgents on Two Collectors in Different Clusters - HTTPS Example">
<agent-specifier>.*\|.*\|EPAgent.*</agent-specifier> <include>
<collector host="host01" port="8444"/> <collector host="host02" port="8444"/>
</include>
</agent-collector>
下列示例显示出,在代理使用 SSL 连接到收集器时,如何将 EPAgent 分配给在不同群集的收集器。
<agent-collector name="Allow EPAgents on Two Collectors in Different Clusters - SSL Example">
<agent-specifier>.*\|.*\|EPAgent.*</agent-specifier> <include>
<collector host="host01" port="5443"/> <collector host="host02" port="5443"/>
</include>
</agent-collector>
|
版权所有 © 2013 CA。
保留所有权利。
|
|