Skip to main content

metrics

Creates, updates, deletes, gets or lists a metrics resource.

Overview​

Namemetrics
TypeResource
Idoci.monitoring.metrics

Fields​

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_metricsexeccompartmentId, regionopc-request-id, page, limit, compartmentIdInSubtreeReturns metric definitions that match the criteria specified in the request. Compartment OCID required.<br />For more information, see<br />[Listing Metric Definitions](/iaas/Content/Monitoring/Tasks/list-metric.htm).<br />For information about metrics, see<br />[Metrics Overview](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#MetricsOverview).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />Transactions Per Second (TPS) per-tenancy limit for this operation: 10.<br />
summarize_metrics_dataexeccompartmentId, region, namespace, queryopc-request-id, compartmentIdInSubtreeReturns aggregated data that match the criteria specified in the request. Compartment OCID required.<br />For more information, see<br />[Querying Metric Data](/iaas/Content/Monitoring/Tasks/query-metric-landing.htm)<br />and<br />[Creating a Query](/iaas/Content/Monitoring/Tasks/query-metric.htm).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />Transactions Per Second (TPS) per-tenancy limit for this operation: 10.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
compartmentIdInSubtreebooleanWhen true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.
limitintegerFor list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Default: 1000 Example: 500
opc-request-idstringCustomer part of the request identifier token. If you need to contact Oracle about a particular request, please provide the complete request ID.
pagestringFor list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).

Lifecycle Methods​

Returns metric definitions that match the criteria specified in the request. Compartment OCID required.<br />For more information, see<br />[Listing Metric Definitions](/iaas/Content/Monitoring/Tasks/list-metric.htm).<br />For information about metrics, see<br />[Metrics Overview](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#MetricsOverview).<br />For important limits information, see<br />[Limits on Monitoring](/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#limits).<br /><br />Transactions Per Second (TPS) per-tenancy limit for this operation: 10.<br />

EXEC oci.monitoring.metrics.list_metrics
@compartmentId='{{ compartmentId }}' --required,
@region='{{ region }}' --required,
@opc-request-id='{{ opc-request-id }}',
@page='{{ page }}',
@limit='{{ limit }}',
@compartmentIdInSubtree={{ compartmentIdInSubtree }}
@@json=
'{
"dimensionFilters": "{{ dimensionFilters }}",
"groupBy": "{{ groupBy }}",
"name": "{{ name }}",
"namespace": "{{ namespace }}",
"resourceGroup": "{{ resourceGroup }}",
"sortBy": "{{ sortBy }}",
"sortOrder": "{{ sortOrder }}"
}'
;