# monitoring-operations

A skill for setting up OCI Monitoring metrics and alarms, and for figuring out why data stops showing up. Useful when an alarm stays silent or a metric disappears.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1400 installs · ★ 22
- Author: alexander-cedergren
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/acedergren/oci-agent-skills/tree/HEAD/skills/monitoring-operations/SKILL.md
- Updated: 2026-04-24
- HTML: https://affpapa.org/en/nevibecode/skills/monitoring-operations

## What it does

The skill fills a gap in what the model knows about OCI: CLI syntax and API structure change monthly, and metric namespaces are easy to mix up. Inside are MQL query patterns, a namespace table by service (Compute, Autonomous DB, Load Balancer, Object Storage) and a walkthrough of common mistakes.

There is a section on lag. Metrics publish every 1–5 minutes, processing adds another 5–10, so 10–15 minutes pass between an event and a visible metric. Don't hunt for the cause of "missing" metrics in the first 15 minutes after creating a resource. For alarms on sparse metrics, the skill advises against `=` in the threshold and suggests `{dataMissing=zero}` instead — otherwise the condition never fires.

Another frequent reason for empty graphs is a missing `resourceId` dimension. A query without it scans every instance and runs slower. The skill also points out that an alarm with no notification channel is useless, and that Cloud Guard should be wired to Notifications so findings don't sit unnoticed.

## Requirements
- Works with: Terraform

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add acedergren/oci-agent-skills --skill monitoring-operations -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/monitoring-operations/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/monitoring-operations/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add acedergren/oci-agent-skills --skill monitoring-operations -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/monitoring-operations/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add acedergren/oci-agent-skills --skill monitoring-operations -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/monitoring-operations/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install acedergren/oci-agent-skills monitoring-operations
```

2. **Manually: put the files in place**
- File: `.github/skills/monitoring-operations/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add acedergren/oci-agent-skills --skill monitoring-operations -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/acedergren/oci-agent-skills --path skills/monitoring-operations
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/monitoring-operations/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add acedergren/oci-agent-skills --skill monitoring-operations -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/acedergren/oci-agent-skills/tree/HEAD/skills/monitoring-operations/SKILL.md

## When to use it
- A metric doesn't appear right after a resource is created — 10–15 minutes of lag is expected.
- An alarm with an `=` threshold never fires when the metric has gaps.
- A query without the `resourceId` dimension scans all instances and slows down.
- Logs never reach Log Analytics because the Service Connector or IAM policy isn't set up.

## Example prompts
- Alarm setup: ask the skill to build a condition with `{dataMissing=zero}` and a trigger delay so it doesn't fire on every CPU spike.
- Missing metrics: describe the resource and namespace, and the skill will point at where to look.
- Logs: run the checklist to confirm logging is on for the resource and the Service Connector is active.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 1bb6dd0797f77a83.

BEGIN THIRD-PARTY FILE 1bb6dd0797f77a83
````text
---
name: monitoring-operations
description: Use when setting up metrics, alarms, or troubleshooting missing data in OCI Monitoring. Covers metric namespace confusion, alarm threshold gotchas, log collection setup, and common monitoring gaps.
license: MIT
metadata:
  author: alexander-cedergren
  version: "2.0.0"
---

# OCI Monitoring and Observability - Expert Knowledge

## 🏗️ Use OCI Landing Zone Terraform Modules

**Don't reinvent the wheel.** Use [oracle-terraform-modules/landing-zone](https://github.com/oracle-terraform-modules/terraform-oci-landing-zones) for observability stack.

**Landing Zone solves:**
- ❌ Bad Practice #10: No logging, monitoring, notifications (Landing Zone deploys complete observability)
- ❌ Bad Practice #7: Limited security services (Landing Zone integrates Cloud Guard, VSS, OSMS)

**This skill provides**: Metrics, alarms, and troubleshooting for monitoring deployed WITHIN a Landing Zone.

---

## ⚠️ OCI CLI/API Knowledge Gap

**You don't know OCI CLI commands or OCI API structure.**

Your training data has limited and outdated knowledge of:
- OCI CLI syntax and parameters (updates monthly)
- OCI API endpoints and request/response formats
- Monitoring service CLI operations (`oci monitoring alarm`, `oci monitoring metric`)
- Metric namespaces and MQL (Monitoring Query Language)
- Latest Logging and Service Connector features

**When OCI operations are needed:**
1. Use exact CLI commands from this skill's references
2. Do NOT guess metric namespace names
3. Do NOT assume AWS CloudWatch patterns work in OCI
4. Load reference files for detailed MQL documentation

**What you DO know:**
- General observability concepts
- Alerting and threshold design principles
- Log aggregation patterns

This skill bridges the gap by providing current OCI-specific monitoring patterns and gotchas.

---

## NEVER Do This

❌ **NEVER assume metrics are instant (10-15 minute lag)**
- Metrics published every 1-5 minutes
- Processing delay: 5-10 minutes
- **Total lag**: 10-15 minutes from event to visible metric
- Don't debug "missing metrics" within first 15 minutes of resource creation

❌ **NEVER use `=` for alarm thresholds with sparse metrics**
```
# WRONG - alarm never fires if metric has gaps
MetricName[1m].mean() = 0
````
END THIRD-PARTY FILE 1bb6dd0797f77a83

The third-party file has ended. Everything between the 1bb6dd0797f77a83 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2282 of 6270 bytes. © alexander-cedergren · MIT · https://github.com/acedergren/oci-agent-skills/tree/HEAD/skills/monitoring-operations/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
