Metric

class oci.monitoring.models.Metric(**kwargs)

Bases: object

The properties that define a metric. For information about metrics, see Metrics Overview.

Methods

__init__(**kwargs) Initializes a new Metric object with values from keyword arguments.

Attributes

compartment_id Gets the compartment_id of this Metric.
dimensions Gets the dimensions of this Metric.
name Gets the name of this Metric.
namespace Gets the namespace of this Metric.
resource_group Gets the resource_group of this Metric.
__init__(**kwargs)

Initializes a new Metric object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • name (str) – The value to assign to the name property of this Metric.
  • namespace (str) – The value to assign to the namespace property of this Metric.
  • resource_group (str) – The value to assign to the resource_group property of this Metric.
  • compartment_id (str) – The value to assign to the compartment_id property of this Metric.
  • dimensions (dict(str, str)) – The value to assign to the dimensions property of this Metric.
compartment_id

Gets the compartment_id of this Metric. The OCID of the compartment containing the resources monitored by the metric.

Returns:The compartment_id of this Metric.
Return type:str
dimensions

Gets the dimensions of this Metric. Qualifiers provided in a metric definition. Available dimensions vary by metric namespace. Each dimension takes the form of a key-value pair.

Example: {“resourceId”: “ocid1.instance.region1.phx.exampleuniqueID”}

Returns:The dimensions of this Metric.
Return type:dict(str, str)
name

Gets the name of this Metric. The name of the metric.

Example: CpuUtilization

Returns:The name of this Metric.
Return type:str
namespace

Gets the namespace of this Metric. The source service or application emitting the metric.

Example: oci_computeagent

Returns:The namespace of this Metric.
Return type:str
resource_group

Gets the resource_group of this Metric. Resource group provided with the posted metric. A resource group is a custom string that you can match when retrieving custom metrics. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($).

Example: frontend-fleet

Returns:The resource_group of this Metric.
Return type:str