query_metric_data
Retrieve metric data from Oracle Cloud Infrastructure for specified time ranges using MQL queries to monitor resource performance and analyze trends.
Instructions
Query metric data for a time range using MQL.
Args:
compartment_id: OCID of the compartment
query: Metric query in MQL format (e.g., "CpuUtilization[1m].mean()")
start_time: Start time in ISO format (YYYY-MM-DDTHH:MM:SSZ)
end_time: End time in ISO format (YYYY-MM-DDTHH:MM:SSZ)
resolution: Data resolution (1m, 5m, 1h)
Returns:
List of metric data points with timestamps and values
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"compartment_id": "<compartment_id>",
"query": "<query>",
"start_time": "<start_time>",
"end_time": "<end_time>"
},
"name": "query_metric_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compartment_id | Yes | ||
| query | Yes | ||
| start_time | Yes | ||
| end_time | Yes | ||
| resolution | No | 1m |