oraclecloud-query-transform
Installation
SKILL.md
OCI Monitoring — MQL Queries & Alarms
Overview
Query OCI metrics using MQL (Monitoring Query Language) and create alarms via the Python SDK. MQL is underdocumented and the console query builder is buggy — it often generates invalid syntax or silently returns empty results. This skill provides working MQL queries for the metrics you actually need (CPU, memory, network, disk) via the SDK, bypassing console issues entirely.
Purpose: Retrieve infrastructure metrics programmatically and set up alerting without relying on the OCI Console query builder.
Prerequisites
- OCI Python SDK —
pip install oci - Config file at
~/.oci/configwith fields:user,fingerprint,tenancy,region,key_file - IAM policies:
Allow group Developers to read metrics in compartment <name>Allow group Developers to manage alarms in compartment <name>Allow group Developers to manage ons-topics in compartment <name>(for alarm notifications)
- Python 3.8+
- Running compute instances or other resources emitting metrics