create_aggregate_service

Defines an aggregate service: name and its sub-services. After the aggregate service is created, you can edit it from the Enterprise Manager Cloud Control console to configure performance and usage metrics to be collected and displayed.

Format

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

Options

  • name

    Aggregate service name.

  • type

    Aggregate service type.

  • availType

    Sets availability to either sub-service, system-based, or test-based. Valid values are SUB-SERVICE, SYSTEM, and TESTS.

    If availability is set to SYSTEM, -systemname and -systemtype are required.

    If availability is set to TESTS, -beacons, template file, and variables are required.

  • add_sub_services

    Sub-services list.

  • avail_eval_func

    Operator to evaluate availability. If "and" is used, all sub-services, tests, and system-components must be up in order for this aggregate_service to be up. If "or" is used, only one of the sub-services, tests, and system-components needs to be up for this aggregate_service to be up.

  • hostName

    Network name of the system running the Management Agent that is collecting data for this target instance.

  • agentURL

    URL of the Management Agent that is collecting data for this target instance. If you enter the host name, the Agent URL of the host is automatically entered in this field.

  • properties

    Name-value pair (that is, prop_name|prop_value) list of properties for the service instance.

  • timezone_region

    Accepts either long formats ("America/Los Angeles") or short formats ("PST"). If you do not provide a time zone, the default OMS time zone is used.

  • systemname

    System name on which service resides.

  • systemtype

    Use emcli get_targets to obtain the system type for the system name.

  • keycomponents

    Name-type pair (that is, keycomp_name:keycomp_type) list of key components in the system that are used for the service.

  • beacons

    Name-isKey pairs that describe the beacons of the service. If isKey is set to Y, the beacon is set as a key-beacon of the service. The service should have at least one key beacon if the availability is set to test-based.

  • input_file

    Template file name is the XML file that includes the template definition. Variable file defines the values for the template.

    For more information about the input_file option, see -input_file Syntax Guidelines.

    See below for an example of an XML file for this option.

  • sysAvailType

    Type of availability when the availType is system-based. Sets the availability to either SYSTEM_TARGET_DIRECTLY or SELECTED_COMPONENTS_OF_A_SYSTEM.

    If availability is set to SYSTEM_TARGET_DIRECTLY, the system needs to have availability[status] defined. -systemname and -systemtype are required options.

    If availability is set to SELECTED_COMPONENTS_OF_A_SYSTEM, -systemname, -systemtype and -keycomponents are required options.

    If availability is set to SYSTEM_TARGET_DIRECTLY and if the system does not have availability[status] defined, the availability set is invalid. Therefore, the only option that can be set is SELECTED_COMPONENTS_OF_A_SYSTEM.

Example

     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 for input_file Example

The following sample XML file creates a service test of name 'EM Console Service Test' and of type 'Web Transaction'. It defines some properties, such as readTimeout, Collection Interval, and so forth under the <properties> section, which are related to this service test.

This service test has defined step information under <mgmt_bcn_step_with_props>. The name of the step is '1.Access Logout page'. The URL to be monitored under this step is https://myhost.in.domain.com:14513/em/console/logon/logoff?event=load, which is defined under the properties section of the step.

This XML file also defines some threshold levels for this service test on the transaction level under <txn_thresholds>. For the metric avg_response_time, it states that if the metric value is greater than 6000.0, raise a warning alert, and if the metric value is greater than 12000.0, raise a critical alert.

<?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>