create_aggregate_service
集約サービス(名前とそのサブサービス)を定義します。集約サービスの作成後、Enterprise Manager Cloud Controlコンソールから編集して、収集および表示するパフォーマンスと使用状況メトリックを構成できます。
書式
emcli create_aggregate_service -name='name' -type='type' -availType=SUB-SERVICE|SYSTEM|TESTS -add_sub_services="name1:type1;name2:type2;..." -avail_eval_func=and|or [-hostName=<host_name> [-agentURL=<agent_url> [-properties='pname1|pval1;pname2|pval2;...'] [-timezone_region=<gmt_offset>] [-systemname=<system_name>] [-systemtype=<system_type>] [-keycomponents='keycomp1name:keycomp1type;keycomp2name:keycomp2type;...'] [-beacons='bcn1name:bcn1isKey;bcn2name:bcn2isKey;...'] [-input_file='template:Template_file_name;[vars:Variables_file_name]'] [-sysAvailType=<availability_type>] [ ] indicates that the parameter is optional
オプション
-
name
集約サービス名。
-
type
集約サービス・タイプ。
-
availType
可用性をサブサービス、システムベースまたはテストベースに設定します。有効な値は、SUB-SERVICE、SYSTEMおよびTESTSです。
可用性をSYSTEMに設定すると、-systemnameおよび-systemtypeが必要になります。
可用性をTESTSに設定すると、TESTS、-beacons、テンプレート・ファイル、変数が必要になります。
-
add_sub_services
サブサービスのリスト。
-
avail_eval_func
可用性を評価する演算子。andを使用した場合、このaggregate_serviceを使用するには、すべてのサブサービス、テストおよびシステム・コンポーネントが起動している必要があります。orを使用した場合、このaggregate_serviceを起動するには、サブサービス、テストおよびシステム・コンポーネントの1つのみが起動している必要があります。
-
hostName
このターゲット・インスタンスのデータを収集する管理エージェントを実行しているシステムのネットワーク名。
-
agentURL
このターゲット・インスタンス用のデータを収集する管理エージェントのURL。ホスト名を入力すると、このフィールドにはホストのエージェントURLが自動的に入力されます。
-
properties
サービス・インスタンスのプロパティの名前と値のペア(prop_name:prop_valueなど)のリスト。
-
timezone_region
長い書式(America/Los Angeles)または短い書式(PST)のいずれも可能。タイム・ゾーンを指定しない場合、デフォルトのOMSタイム・ゾーンが使用されます。
-
systemname
サービスが存在しているシステムの名前。
-
systemtype
システム名のシステム・タイプをemcli get_targetsを使用して取得。
-
keycomponents
サービスに使用されているシステムのキー・コンポーネントの名前とタイプのペア(
keycomp_name:keycomp_type
など)のリスト。 -
beacons
サービスのビーコンを説明する名前とisKeyのペア。isKeyが
Y
に設定されている場合、ビーコンはサービスのキー・ビーコンとして設定されます。可用性をテストベースに設定した場合、サービスには、少なくとも1つのキー・ビーコンが必要です。 -
input_file
テンプレート・ファイル名は、テンプレート定義を含むXMLファイルです。変数ファイルでは、テンプレートの値を定義します。
input_fileオプションの詳細は、「-input_fileの構文ガイドライン」を参照してください。
このオプションのXMLファイルでの例は、次を参照してください。
-
sysAvailType
availTypeがシステムベースの場合の可用性のタイプ。可用性をSYSTEM_TARGET_DIRECTLYまたはSELECTED_COMPONENTS_OF_A_SYSTEMのいずれかに設定します。
可用性にSYSTEM_TARGET_DIRECTLYが設定される場合、システムには可用性(ステータス)が定義されている必要があります。-systemnameおよび-systemtypeは必要なオプションです。
可用性がSELECTED_COMPONENTS_OF_A_SYSTEMに設定されている場合、-systemname、-systemtypeおよび-keycomponentsが必要なオプションです。
可用性がSYSTEM_TARGET_DIRECTLYに設定されている場合で、システムに可用性(ステータス)が定義されていない場合、可用性セットは無効です。したがって、設定できる唯一のオプションはSELECTED_COMPONENTS_OF_A_SYSTEMです。
例
emcli create_aggregate_service -name="My_Name" -type="aggregate_service" -add_sub_services="sub1:type1;sub2:type2" -avail_eval_func="and" -availType="SUB_SERVICE" -properties="prop1|value1;prop2|value2" -timezone_region="PST"
XMLの例のinput_file
次のサンプルXMLファイルでは、EM Console Service Testという名前のタイプWeb Transactionのサービス・テストを作成します。このサービス・テストと関連するreadTimeout、Collection Intervalなどのいくつかのプロパティを<properties>のセクションに定義します。
このサービス・テストでは、<mgmt_bcn_step_with_props>の下にステップ情報が定義されています。このステップの名前は1.Access Logout pageです。このステップでモニターするURLは、ステップのプロパティ・セクションで定義されているhttps://myhost.in.domain.com:14513/em/console/logon/logoff?event=loadです。
このXMLファイルでは、<txn_thresholds>の下のトランザクション・レベルでこのサービス・テストのいくつかのしきい値レベルを定義しています。メトリックavg_response_timeでは、メトリック値が6000.0よりも大きい場合には警告アラートを発行し、メトリック値が12000.0よりも大きい場合はクリティカル・アラートを発行するよう示しています。
<?xml version = '1.0' encoding = 'UTF-8'?> <transaction-template template_type="aggregate_service" xmlns="template"> <variables> <variable name="HOST1" value="myhost.in.domain.com"/> <variable name="PORT1" value="14513"/> <variable name="PROTOCOL1" value="https"/> </variables> <transactions> <mgmt_bcn_transaction> <mgmt_bcn_txn_with_props> <mgmt_bcn_txn description="Test for checking the availability of EM Console/Website" is_representative="true" name="EM Console Service Test" monitoring="true" txn_type="HTTP"/> <properties> <property name="readTimeout" num_value="120000.0" prop_type="2" encrypt="false"/> <property name="certValidationMode" string_value="1" prop_type="1" encrypt="false"/> <property name="maxDownloadSize" num_value="1.0E8" prop_type="2" encrypt="false"/> <property name="sensitiveValuesProtection" string_value="0" prop_type="1" encrypt="false"/> <property name="failureStringModes" string_value="regularText" prop_type="1" encrypt="false"/> <property name="UserAgent" string_value="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) OracleEMAgentURLTiming/3.0" prop_type="1" encrypt="false"/> <property name="successStringModes" string_value="regularText" prop_type="1" encrypt="false"/> <property name="variablesModes" string_value="urlEncode" prop_type="1" encrypt="false"/> <property name="content" string_value="0" prop_type="1" encrypt="false"/> <property name="AcceptLanguage" string_value="en" prop_type="1" encrypt="false"/> <property name="connectionTimeout" num_value="120000.0" prop_type="2" encrypt="false"/> <property name="useCache" string_value="yes" prop_type="1" encrypt="false"/> <property name="stringValidationMode" string_value="1" prop_type="1" encrypt="false"/> <property name="granularity" string_value="transaction" prop_type="1" encrypt="false"/> <property name="numThreads" num_value="4.0" prop_type="2" encrypt="false"/> <property name="retries" num_value="1.0" prop_type="2" encrypt="false"/> <property name="timeout" num_value="300000.0" prop_type="2" encrypt="false"/> <property name="retryInterval" num_value="5000.0" prop_type="2" encrypt="false"/> </properties> <per_bcn_properties/> </mgmt_bcn_txn_with_props> <steps_defn_with_props> <mgmt_bcn_step_with_props> <mgmt_bcn_step step_number="1" name="1.Access Logout page" step_type="HTTP"/> <properties> <property name="req_mode" num_value="1.0" prop_type="2" encrypt="false"/> <property name="http_method" string_value="G" prop_type="1" encrypt="false"/> <property name="url" string_value="{PROTOCOL1}://{HOST1}:{PORT1}/em/console/logon/logoff?event=load" prop_type="1" encrypt="false"/> </properties> </mgmt_bcn_step_with_props> </steps_defn_with_props> <stepgroups_defn/> <txn_thresholds> <mgmt_bcn_threshold warning_threshold="6000.0" warning_operator="0" critical_threshold="12000.0" critical_operator="0" num_occurrences="1"> <mgmt_bcn_threshold_key metric_name="http_response" metric_column="avg_response_time"/> </mgmt_bcn_threshold> <mgmt_bcn_threshold warning_threshold="0.0" warning_operator="1" critical_threshold="0.0" critical_operator="1" num_occurrences="1"> <mgmt_bcn_threshold_key metric_name="http_response" metric_column="status"/> </mgmt_bcn_threshold> </txn_thresholds> <step_thresholds/> <stepgroup_thresholds/> </mgmt_bcn_transaction> </transactions> </transaction-template>