Skip Headers
Oracle® Enterprise Manager Cloud Administration Guide
12c Release 2 (12.1.0.2)

Part Number E28814-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

22 Chargeback and Metering EMCLI Verbs

This chapter describes the EMCLI verbs used for Chargeback and Metering and provides details on verb names, descriptions, parameters and syntax. Examples of verb output and commands are also provided. This chapter contains the following sections:

When to Use Chargeback APIs

The Chargeback APIs can be used to integrate Enterprise Manager with Billing and Revenue Management systems (including Oracle BRM) and also to provide flexible chargeback mechanisms. Some examples include:

Retreiving Metering Data from Enterprise Manager

This section describes the process of retreiving metering data using the get_metering_data verb.

get_metering_data

get_metering_data Output

This verb generates the following output:

  • CONSUMER_NAME: Name of the cost-center.

  • TARGET_TYPE: Type of target.

  • TARGET_NAME: Name of the target.

  • ITEM_TYPE: Type of the item or metric. Possible values are: config, fixed, metric, property, and usage.

  • CATEGORY_NAME: Possible values are: cpu, memory, storage, activity, instance, network, service, and software.

  • ENTITY_NAME: Name of the shared entity (valid when the target is enabled in Chargeback in shared mode).

  • ITEM_DISPLAY_NAME: Display name of the item or metric (in English language). Note: Translation support is currently not available.

  • VALUE_AVERAGE: Average value for the metric on the given date (valid for numeric metrics).

  • STRING_VALUE: Value for the metric data (valid for string-based metrics).

  • DATA_TYPE: Data type of the metric. This can be string or number.

  • UNIT: Unit of the metric data (for example, req and GB).

  • COLLECTION_DATE: Date on which the data is collected from the Enterprise Manager metric or configuration tables.

  • PLAN_NAME: Name of the Charge Plan associated with the particular target.

  • CHARGE: Charge value for the specific metric of the target on the particular date.

  • DEFINED_RATE: Charge rate defined in the charge plan associated with the target.

  • RATE_TYPE: Type of the rate. Possible values are: No value (blank), Flat, config, and usage.

  • RATE_FACTOR: Adjustment rate for universal metrics, as defined in the associated extended Chargeplan.

  • CHARGE_RATE_UNIT: Unit, corresponding to the metric or item, as defined in the Charge Plan for the specific rate. For example, for an item or metric named CPU Utilization (%) or CPU Utilization (%) per service, the value will be "CPU". For a metric or item named Base Charge, the value will be "instance", a metric named 'User Requests', the value will be "req"). If the rate defined in Chargeplan is $1 per MB per day, the value for this column will be "MB" .

  • CHARGE_TIME_UNIT: Time unit as defined in the Charge Plan for the specific rate. (such as, hourly, daily, weekly, monthly, yearly). For example, if the rate defined in Charge Plan is $1 per MB per Day, value for this column will be daily.

Example: Sample Output

"CONSUMER_NAME","TARGET_TYPE","TARGET_NAME","ITEM_TYPE","CATEGORY_NAME","ENTITY_NAME","ITEM_DISPLAY_NAME","STRING_VALUE","PLAN_NAME","COLLECTION_DATE","CHARGE","VALUE_AVERAGE","DEFINED_RATE","RATE_TYPE","RATE_FACTOR","CHARGE_RATE_UNIT","CHARGE_TIME_UNIT","NORMALIZE_RATE","ADJUST_RATE","DATA_TYPE","UNIT" 

"linbo","oracle_vm_guest","mySite/myWls/AdminServer:agent_push","fixed","instance"," ","Base Charge","","zone_plan",15-OCT-11 00:00:00,72,1,"3","flat",1,"instance","hourly",1,1,"number",""
"linbo","oracle_vm_guest","mySite/myWls/AdminServer:agent_push","fixed","instance"," ","Base Charge","","zone_plan",16-OCT-11 00:00:00,72,1,"3","flat",1,"instance","hourly",1,1,"number",""
"linbo","oracle_vm_guest","mySite/myWls/AdminServer:agent_push","fixed","instance"," ","Base Charge","","zone_plan",17-OCT-11 00:00:00,72,1,"3","flat",1,"instance","hourly",1,1,"number",""
"linbo","oracle_vm_guest","mySite/myWls/AdminServer:agent_push","fixed","instance"," ","Base Charge","","zone_plan",18-OCT-11 00:00:00,72,1,"3","flat",1,"instance","hourly",1,1,"number",""
"linbo","oracle_vm_guest","mySite/myWls/Cluster-0_vm0:assembly1","fixed","instance"," ","Base Charge","","zone_plan",15-OCT-11 00:00:00,72,1,"3","flat",1,"instance","hourly",1,1,"number","

Examples

A few examples are shown in the following section:

  • emcli get_metering_data: Returns metering information for all targets (active or enabled in Chargeback) for the current report cycle for the logged in user.

  • emcli get_metering_data -charge: Returns metering and charge information for all targets (active or enabled in Chargeback) for the current report cycle for the logged in user.

  • emcli get_metering_data -start_date=01202011-cost_center=ORG1: Returns metering information for all targets (active or enabled in Chargeback) starting from 20th January 2011 until the end of the month for the ORG1 cost-center.

  • emcli get_metering_data -start_date=01152011 -end_date=02152011 -target_type=oracle_database: Returns metering information for all Oracle DB targets (active or enabled in Chargeback) that are owned by the logged in user, starting from 15th January 2011 until the 15th February 2011.

  • emcli get_metering_data -target_type=host target_name=my_host -cost_center=organization1: Returns metering and charge information for "my_host" target (of type host) for the current report cycle for "organization1" cost-center.

  • emcli get_metering_data -cost_center="All Users": Returns metering and charge information for all targets (active or enabled in Chargeback) in the current report cycle for all cost centers.

  • Log in as cba_admin_user (who is the Chargeback Administrator) and enter the following commands:

    • emcli get_metering_data: Returns metering information for all targets (active or enabled in Chargeback) for the current report cycle for the cba_admin_user.

    • emcli get_metering_data -cost_center=ssa_user1: Returns metering information for all targets (active or enabled in Chargeback) that are owned by the ssa_user1 in the cost center in the current report cycle.

  • If the value specified for the cost center, target type, and / or target name is incorrect, no data is generated. For example, the following commands will not generate data:

    • emcli get_metering_data -target_type=unknown

    • emcli get_metering_data -target_type=oracle_database -target_name=unknown_target

      Note: There is no target with the name unknown_target configured in Enterprise Manager.