MetricData

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

Bases: object

The set of aggregated data returned for a metric. For information about metrics, see Metrics Overview.

Limits information for returned data follows.

  • Data points: 100,000.
  • Metric streams* within data points: 2,000.
  • Time range returned for 1-day resolution: 90 days.
  • Time range returned for 1-hour resolution: 90 days.
  • Time range returned for 5-minute resolution: 30 days.
  • Time range returned for 1-minute resolution: 7 days.

Methods

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

Attributes

aggregated_datapoints [Required] Gets the aggregated_datapoints of this MetricData.
compartment_id [Required] Gets the compartment_id of this MetricData.
dimensions [Required] Gets the dimensions of this MetricData.
metadata Gets the metadata of this MetricData.
name [Required] Gets the name of this MetricData.
namespace [Required] Gets the namespace of this MetricData.
resolution Gets the resolution of this MetricData.
resource_group Gets the resource_group of this MetricData.

*A metric stream is an individual set of aggregated data for a metric with zero or more dimension values. Metric streams cannot be aggregated across metric groups. A metric group is the combination of a given metric, metric namespace, and tenancy for the purpose of determining limits. For more information about metric-related concepts, see Monitoring Concepts.

__init__(**kwargs)

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

Parameters:
  • namespace (str) – The value to assign to the namespace property of this MetricData.
  • resource_group (str) – The value to assign to the resource_group property of this MetricData.
  • compartment_id (str) – The value to assign to the compartment_id property of this MetricData.
  • name (str) – The value to assign to the name property of this MetricData.
  • dimensions (dict(str, str)) – The value to assign to the dimensions property of this MetricData.
  • metadata (dict(str, str)) – The value to assign to the metadata property of this MetricData.
  • resolution (str) – The value to assign to the resolution property of this MetricData.
  • aggregated_datapoints (list[oci.monitoring.models.AggregatedDatapoint]) – The value to assign to the aggregated_datapoints property of this MetricData.
aggregated_datapoints

[Required] Gets the aggregated_datapoints of this MetricData. The list of timestamp-value pairs returned for the specified request. Metric values are rolled up to the start time specified in the request. For important limits information related to data points, see MetricData Reference at the top of this page.

Returns:The aggregated_datapoints of this MetricData.
Return type:list[oci.monitoring.models.AggregatedDatapoint]
compartment_id

[Required] Gets the compartment_id of this MetricData. The OCID of the compartment containing the resources that the aggregated data was returned from.

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

[Required] Gets the dimensions of this MetricData. Qualifiers provided in the definition of the returned metric. 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 MetricData.
Return type:dict(str, str)
metadata

Gets the metadata of this MetricData. The references provided in a metric definition to indicate extra information about the metric.

Example: “unit”: “bytes”

Returns:The metadata of this MetricData.
Return type:dict(str, str)
name

[Required] Gets the name of this MetricData. The name of the metric.

Example: CpuUtilization

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

[Required] Gets the namespace of this MetricData. The reference provided in a metric definition to indicate the source service or application that emitted the metric.

Example: oci_computeagent

Returns:The namespace of this MetricData.
Return type:str
resolution

Gets the resolution of this MetricData. The time between calculated aggregation windows. Use with the query interval to vary the frequency for returning aggregated data points. For example, use a query interval of 5 minutes with a resolution of 1 minute to retrieve five-minute aggregations at a one-minute frequency. The resolution must be equal or less than the interval in the query. The default resolution is 1m (one minute). Supported values: 1m-60m, 1h-24h, 1d.

Example: 5m

Returns:The resolution of this MetricData.
Return type:str
resource_group

Gets the resource_group of this MetricData. 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 MetricData.
Return type:str