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>
以下の例は、ラッチ済みプロパティを設定する方法を示しています。各値は以下のとおりです。
<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>
以下の例は、MyAgent という名前のエージェントを MyHost という名前のコレクタから除外する方法を示しています。
<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 から Enterprise Manager への特定の通信チャネル ポートを使用し、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>
Copyright © 2013 CA.
All rights reserved.
|
|