oraclecloud-query-transform

Featured

Query OCI metrics with MQL and create monitoring alarms via the Python SDK. Use when building dashboards, querying CPU/memory/network metrics, or creating alarms. Trigger with "oci monitoring", "mql query", "oci metrics", "oci alarm", "cpu utilization oci".

AI & Automation 2,940 stars 439 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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/config` with 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 ## Instructions ### Step 1: Understand MQL Syntax MQL queries follow this pattern: ``` MetricName[interval]{dimensionKey = "value"}.groupingFunction.statistic ``` Key components: - **MetricName** — e.g., `CpuUtilization`, `MemoryUtilization`, `NetworkBytesIn` - **Interval** — data granularity: `1m`, `5m`, `1h` (minimum depends on metric) - **Dimensions** — filters in curly braces: `{resourceId = "ocid1.instance..."}` - **Group...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category