set_metric_promotion
Creates or edits a metric promotion based on a test or system.
Format
emcli set_metric_promotion
-name=<service_target_name
-type=<service_target_type
***[-category=Usage/Performance/Business]
-basedOn=SYSTEM|TESTS|SUB_SERVICE
-aggFunction=AVG|MAX|MIN|SUM|COPY
[-promotedMetricName=<promoted_metric>]
[-promotedMetricColumn=<promoted_metric_column>]
-promotedMetricKey=<key_value_of_promoted_metric>
[-metricName=<dependent_metric_name>]
-column=<dependent_metric_column>
*[-depTargetType=<target_type_of_dependent_targets>]
*#[-depTargets='target1;target2...']
*#[-depTargetKeyValues='target1:key11|key12|key13..;
target2:key21|key22|key23..']
*[-depMetricKeyValue=<dependent_metric_key_column>]
**[-testname=<dependent_test_name]
**[-testtype=<dependent_test_type]
**[-metricLevel=TXN|STEP|STEPGROUP]
**[-beacons='bcn1;bcn2..']
**[-depTestComponent=<step_or_stepgroup_name>]
[-threshold='critical_threshold_value;warning_threshold_value;
threshold_operator (EQ|LE|LT|GT|GE)']
-mode=CREATE|EDIT
#[-includeRuleBasedTargets = YES|NO]
[-targetFilter = ALL|STARTS_WITH:<filter>|ENDS_WITH:<filter>|
CONTAINS:<filter>|EQUALS:<filter>]
[ ] indicates that the parameter is optional.
Key:
* — Might be required if basedOn is set to SYSTEM ** — Might be required if basedOn is set to TESTS *** — Might be required if basedOn is set to SUB_SERVICE # — One of these values is required for system-based metrics.
Options
-
category
Defines whether the promoted metric is a usage, performance, or business metric of a service. Category is used to determine the promoted metric name and metric column. If you do not specify this option, you must specify the
promotedMetricNameandpromotedMetricColumnoptions. -
basedOn
Determines whether the promotion is test-based or system-based.
-
aggFunction
Determines the aggregate function to be used to compute the promoted metric.
AVG/MAX/MIN/SUMtakes average, max, min, and sum of the dependent metrics, respectively.COPYonly copies over a single dependent metric to the promoted metric. -
promotedMetricName
Promoted metric name. This is optional if the category is specified.
-
promotedMetricColumn
Promoted metric column. This is optional if the category is specified.
-
promotedMetricKey
Required argument that determines the key value of the promoted metric. It is equivalent to the displayed name of the promoted metric in the UI.
-
metricName
Required argument if the dependent metric column is collected by more than one metric.
-
column
Dependent metric column.
-
depTargetType
All dependent targets should be of this target type.
-
depTargets
Specifies the dependent targets. This argument is ignored if you specify
depTargetKeyValues. -
depTargetKeyValues
Specifies the key values associated with the dependent targets. Specify multiple key values for a single target by repeating the entry in the following format:
'tgt1:key1;tgt1:key2...' -
depMetricKeyValue
Required if the dependent metric is a transpose metric. It is the key value that applies to all the dependent targets.
-
testname
Defines the name of the test to be used in promoting the metric.
-
testtype
Defines the type of test to be used in promoting the metric.
-
metricLevel
Some metrics can be promoted on step-level. This option defines the level to be used during promotion.
-
beacons
List of beacons to be used for promoting the metric data.
-
depTestComponent
If
metricLevelis notTXN, this option is required to specify which step or which step group is being promoted. -
threshold
Defines a threshold on the promoted metric.-mode: The mode can be
CREATEor EDIT. -
includeRuleBasedTargets
If YES, the system member targets available at the time of metric evaluation are considered for metric evaluation. The default is NO. This option is applicable only for system-based metrics.
-
targetFilter
The given target filter value is compared with target names of system member targets. The member targets that meet this filter value will participate in the metric evaluation. For a target filter, wild cards such as *, % an so forth are not accepted. e.g., ALL, STARTS_WITH:EM, ENDS_WITH:EM, CONTAINS:EM and EQUALS:EM.
Examples
Example 1
This example creates a promoted Performance metric with key value mymetric1 on service MyTarget using MyTest/HTTP. The promoted metric takes the maximum of the dns_time metric column returned by the MyBeacon and mybcn1 beacons. It also has a threshold with 'greater or equal to' operator (GE) with the critical value set to 200 and warning value set to 100.
emcli set_metric_promotion -name='MyTarget' -type='generic_service'
-category=Performance -basedOn=test -aggFunction=MAX
-testname='MyTest' -testtype=HTTP
-beacons='MyBeacon, mybcn1'
-promotedMetricKey=mymetric1 -column=dns_time -metricName=http_response
-metricLevel=TXN -threshold='200;100;GE' -mode=CREATE
Example 2
This example creates a promoted Usage metric with the key value AppServerComponentUsage on service MyTarget. The dependent target is 'myapp_server' with type 'oracle_ias'. The promoted metric computes the average value of the cpu.component metric column for the specified key values.
emcli set_metric_promotion -name='MyTarget' -type='generic_service'
-category=Usage -basedOn=system -aggFunction=AVG
-promotedMetricKey=AppServerComponentUsage -depTargetType=oracle_ias
-column=cpu.component
-metricName=opmn_process_info
-depTargetKeyValues='myapp_server:petstore;myapp_server:http_server'
-mode=CREATE