monitoring-operations
acedergren/oci-agent-skills
Set up OCI metrics, alarms, and log collection without common gotchas like namespace confusion and missing data handling.
What is monitoring-operations?
Expert guidance for configuring OCI Monitoring, alarms, and log collection within a Landing Zone. Covers metric namespace specifics, alarm threshold design, data lag expectations, and troubleshooting missing metrics or logs. Use this when setting up observability or debugging monitoring gaps.
- Identify correct metric namespaces for OCI services (Compute, Autonomous DB, Load Balancer, Object Storage)
- Configure alarm thresholds with proper missing-data handling and trigger delays to avoid false positives
- Troubleshoot missing metrics and logs using decision trees for common configuration gaps
- Optimize metric queries by filtering on dimensions to avoid rate-limit issues
- Set up Service Connector for log collection with required IAM policies
How to install monitoring-operations
npx skills add https://github.com/acedergren/oci-agent-skills --skill monitoring-operations- OCI tenancy with Monitoring service enabled
- OCI CLI installed and configured with appropriate credentials
- Understanding of basic observability concepts (metrics, alarms, logs)
How to use monitoring-operations
- 1.Identify the OCI service you're monitoring and locate its metric namespace from the provided table
- 2.Define your alarm threshold using the correct MQL syntax, including resourceId dimension and dataMissing handling
- 3.Set trigger delay (e.g., 5 minutes) to require sustained breaches before firing
- 4.Create notification channels (email, Slack, PagerDuty) and link them to the alarm
- 5.For logs: verify the source resource has logging enabled, confirm Service Connector is ACTIVE, and check IAM policies allow log-content access
- 6.Wait 10-15 minutes after resource creation before debugging missing metrics
Use cases
- Creating CPU utilization alarms with sustained-threshold logic to reduce alert fatigue
- Debugging why metrics don't appear 5 minutes after resource creation (accounting for 10-15 minute lag)
- Configuring log collection from Compute instances via oci-compute-agent and Service Connector
- Setting up Cloud Guard findings notifications to catch misconfigurations before incidents
- Querying specific instance metrics by resourceId dimension instead of scanning all instances
- OCI infrastructure operators setting up observability stacks
- DevOps engineers troubleshooting missing metrics or silent alarms
- Cloud architects integrating monitoring into Landing Zone deployments
- On-call engineers responding to monitoring gaps or alert fatigue issues
monitoring-operations FAQ
OCI metrics have a 10-15 minute total lag: metrics are published every 1-5 minutes, then processing adds 5-10 minutes of delay. Do not debug missing metrics within the first 15 minutes.
treatMissingDataAsBreaching fires the alarm if no data arrives (use for critical services where silence = outage). {dataMissing=zero} treats missing values as 0 in the query (use for counters like requests/sec).
Use a longer aggregation window (5m instead of 1m) and set a trigger delay (e.g., 5 minutes) so the alarm only fires after 5 consecutive breaches, not on every transient spike.
Check: (1) logging is enabled on the resource (e.g., oci-compute-agent running), (2) Service Connector source and target are configured and ACTIVE, (3) IAM policies allow loganalytics to READ logcontent, and (4) wait 10-15 minutes for ingestion lag.
Always filter by dimension (e.g., resourceId) to query specific instances. Querying all instances is slow and hits rate limits faster. Queries are free but limited to 1000 req/min.
Full instructions (SKILL.md)
Source of truth, from acedergren/oci-agent-skills.
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 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:
- Use exact CLI commands from this skill's references
- Do NOT guess metric namespace names
- Do NOT assume AWS CloudWatch patterns work in OCI
- 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
# RIGHT - handle missing data
MetricName[1m]{dataMissing=zero}.mean() > 0
❌ NEVER forget metric dimensions (causes "no data")
# WRONG - missing required dimension
CPUUtilization[1m].mean()
# RIGHT - include resourceId dimension
CPUUtilization[1m]{resourceId="<instance-ocid>"}.mean()
❌ NEVER set alarm thresholds without trigger delay (alert fatigue)
# BAD - fires on every CPU spike
CPUUtilization[1m].mean() > 80
# BETTER - sustained high CPU
CPUUtilization[5m].mean() > 80
Trigger delay: 5 minutes (fires after 5 consecutive breaches)
❌ NEVER create alarms without notification channels
# WRONG - alarm fires but nobody knows
oci monitoring alarm create ... --destinations '[]'
# RIGHT - always link to notification topic
oci monitoring alarm create ... --destinations '["<notification-topic-ocid>"]'
Cost impact: Undetected outages cost $5,000-50,000/hour in production
❌ NEVER ignore Cloud Guard findings (security audit failure)
- Cloud Guard detects misconfigurations BEFORE they become incidents
- Integrate Cloud Guard → Notifications → Email/Slack/PagerDuty
- Cost impact: $100,000+ per security breach vs $0 for proactive remediation
Metric Namespace Gotchas
OCI Metrics Use Service-Specific Namespaces:
| Service | Namespace | Example Metric |
|---|---|---|
| Compute | oci_computeagent | CPUUtilization, MemoryUtilization |
| Autonomous DB | oci_autonomous_database | CpuUtilization, StorageUtilization |
| Load Balancer | oci_lbaas | HttpRequests, UnHealthyBackendServers |
| Object Storage | oci_objectstorage | ObjectCount, BytesUploaded |
Common Mistake: Using wrong namespace (oci_compute vs oci_computeagent)
Alarm Missing Data Handling
| Setting | Behavior | Use When |
|---|---|---|
treatMissingDataAsBreaching | Alarm fires if no data | Critical services (outage = breach) |
treatMissingDataAsNotBreaching | Alarm silent if no data | Optional monitoring |
{dataMissing=zero} | Treat missing as 0 | Counters (requests/sec) |
Log Collection Common Gaps
Problem: Logs not showing in Log Analytics
Logs not appearing?
├─ Is log enabled on resource?
│ └─ Compute: oci-compute-agent must be running
│ └─ Function: Logging enabled in function config
│
├─ Is Service Connector configured?
│ └─ Source: Log Group → Target: Log Analytics
│ └─ Check: Service Connector status = ACTIVE
│
├─ IAM policy for Service Connector?
│ └─ "Allow any-user to use log-content in tenancy"
│ └─ "Allow service loganalytics to READ logcontent in tenancy"
│
└─ 10-15 minute ingestion lag?
└─ Wait before debugging
Metric Query Optimization
Expensive (slow):
# Queries ALL instances
CPUUtilization[1m].mean()
Optimized (filter by dimension):
# Query specific instance
CPUUtilization[1m]{resourceId='<instance-ocid>'}.mean()
Cost: Queries free, but rate limited (1000 req/min)
Progressive Loading References
OCI Monitoring Reference (Official Oracle Documentation)
WHEN TO LOAD oci-monitoring-reference.md:
- Need comprehensive list of all OCI service metrics
- Understanding MQL (Monitoring Query Language) in depth
- Implementing complex alarm conditions and composites
- Need official Oracle guidance on Logging and Service Connector
- Setting up Log Analytics and APM integration
Do NOT load for:
- Quick alarm setup (examples in this skill)
- Common metric patterns (tables above)
- Troubleshooting decision trees (covered above)
When to Use This Skill
- Alarms: threshold configuration, missing data handling, trigger delay
- Troubleshooting: metrics not showing, alarms not firing, namespace errors
- Log collection: Service Connector, IAM policies, missing logs
- Performance: query optimization, dimension filtering
Related skills
More from acedergren/oci-agent-skills and the wider catalog.

actionbook
Browser action engine with up-to-date web action manuals for instant site automation across multiple tabs.

active-research
Deep research and analysis tool generating comprehensive HTML reports with advanced browser automation.

extract
Extract structured data from websites and produce an executable Playwright script plus extracted data. Use when the user wants to scrape, extract, pull, collect, or harvest data from any website — product listings, tables, search results, feeds, profiles, or any repeating content.

coding-guidelines
Use when asking about Rust code style or best practices. Keywords: naming, formatting, comment, clippy, rustfmt, lint, code style, best practice, P.NAM, G.FMT, code review, naming convention, variable naming, function naming, type naming, 命名规范, 代码风格, 格式化, 最佳实践, 代码审查, 怎么命名

domain-cli
Use when building CLI tools. Keywords: CLI, command line, terminal, clap, structopt, argument parsing, subcommand, interactive, TUI, ratatui, crossterm, indicatif, progress bar, colored output, shell completion, config file, environment variable, 命令行, 终端应用, 参数解析

domain-cloud-native
Use when building cloud-native apps. Keywords: kubernetes, k8s, docker, container, grpc, tonic, microservice, service mesh, observability, tracing, metrics, health check, cloud, deployment, 云原生, 微服务, 容器