metrics
Creates, updates, deletes, gets or lists a metrics resource.
Overview​
| Name | metrics |
| Type | Resource |
| Id | oci.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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_metrics | exec | compartmentId, region | opc-request-id, page, limit, compartmentIdInSubtree | 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 /> |
summarize_metrics_data | exec | compartmentId, region, namespace, query | opc-request-id, compartmentIdInSubtree | Returns 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.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The [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 |
region | string | OCI 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) |
compartmentIdInSubtree | boolean | When 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. |
limit | integer | For 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-id | string | Customer part of the request identifier token. If you need to contact Oracle about a particular request, please provide the complete request ID. |
page | string | For 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​
- list_metrics
- summarize_metrics_data
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 }}"
}'
;
Returns 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 />
EXEC oci.monitoring.metrics.summarize_metrics_data
@compartmentId='{{ compartmentId }}' --required,
@region='{{ region }}' --required,
@opc-request-id='{{ opc-request-id }}',
@compartmentIdInSubtree={{ compartmentIdInSubtree }}
@@json=
'{
"endTime": "{{ endTime }}",
"namespace": "{{ namespace }}",
"query": "{{ query }}",
"resolution": "{{ resolution }}",
"resourceGroup": "{{ resourceGroup }}",
"startTime": "{{ startTime }}"
}'
;