More Info:
Monitor for anomalous GPU instance provisioning. Attackers frequently deploy high-cost, high-compute GPU instances for illicit cryptocurrency mining after compromising cloud accountsRisk Level
MediumAddress
Compliance, SecurityCompliance Standards
- APRA CPS 234 (Australia)
- AWS Well Architected Framework
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Below are concise, console‑only steps to configure an anomalous GPU usage alarm in OCI Monitoring.
This completes remediation: OCI Monitoring now has an anomalous GPU usage alarm configured through the OCI Console.
1. Confirm GPU Metrics Are Available
- In OCI Console, open Observability & Management → Monitoring → Service Metrics.
- In Compartment, select the compartment where your GPU instances run.
- Set:
- Metric namespace:
oci_computeagent - Resource group: often
gpu(or leave as “All” if unsure).
- Metric namespace:
- In Metric name, look for GPU metrics such as:
GpuUtilizationGpuMemoryUtilizationGpuTemperature
- Select a metric and verify you see recent data points in the chart.
If there is no data, ensure the Oracle Cloud Agent (Management Agent) with GPU plugins is enabled on the instance.
2. Create an Alarm for Anomalous GPU Usage
- Go to Observability & Management → Monitoring → Alarms.
- Click Create alarm.
- Name: e.g.,
gpu-anomaly-usage-alarm. - Description: e.g.,
Alarm when GPU utilization behaves anomalously. - Compartment: choose the compartment of the GPU metrics.
- Metric namespace:
oci_computeagent. - Resource group:
gpu(or as confirmed in step 1).
- Under Metric name, select
GpuUtilization(or the specific GPU metric you want to monitor). - For Dimensions, optionally scope to:
- Specific instance:
resourceId = <instance-OCID> - Or other relevant dimensions if needed.
- Specific instance:
- Under Trigger rule (Alarm condition), select:
- Rule type:
Anomaly(orDynamic threshold / Anomaly detectionif phrased that way in your tenancy).
- Rule type:
- Configure anomaly condition:
- Statistic:
avg(ormaxdepending on your policy). - Period: e.g.,
1 minuteor5 minutes. - Anomaly model / Baseline: leave as Automatic unless you have specific training data.
- Sensitivity: set to Medium (adjust later based on noise).
- Statistic:
3. Set Alarm Threshold & Evaluation
- Configure when to fire:
- Condition: e.g.,
Anomaly score > 0or the UI’s default anomaly trigger (often “When metric is anomalous”). - Trigger delay / trigger after: e.g., 3 consecutive periods to avoid noise.
- Condition: e.g.,
- Severity: choose (e.g.,
CriticalorWarningas per your policy).
4. Configure Notifications
- Under Destination, select or create an OCI Notifications topic:
- If needed, click Create topic and then add Subscriptions (email, Slack via HTTPS, PagerDuty, etc.) in Developer Services → Notifications.
- In the alarm:
- Choose Notification topic: select the topic you created.
5. Finalize and Test
- Click Create alarm.
- Confirm the alarm appears in Alarms list with
OKorFIRINGstate. - To test:
- Intentionally increase GPU load (e.g., run a GPU‑heavy workload) to cause anomalous behavior versus normal baseline.
- Verify that the alarm transitions to FIRING and that you receive the notification.
This completes remediation: OCI Monitoring now has an anomalous GPU usage alarm configured through the OCI Console.
Using CLI
Using CLI
Below is a minimal, CLI‑only way to set up an “anomalous GPU usage” alarm in OCI Monitoring. I’ll assume Linux/macOS shell; on Windows, adjust quoting.
Typical GPU utilization metric is under namespace
Save the returned OCID as:Optionally subscribe an email:Then confirm the email.
You can restrict to a specific instance:
Notes:
Get the alarm OCID:Update the query to the correct GPU anomaly condition:
If you paste your actual
1. Prereqs
-
Ensure the instance has GPU metrics published:
- It must be a GPU shape.
- Compute Instance Agent must be running (default on OCI images).
-
Your OCI user must have policies like:
-
OCI CLI configured:
2. Identify GPU Metric and Namespace
List available GPU metrics in the instance’s compartment:oci_computeagent with a name like:GpuUtilizationor similar (use exactly what you see in the output).
namespace(e.g.,oci_computeagent)- metric
name(e.g.,GpuUtilization) - dimensions (e.g.,
resourceId,gpuIndex)
3. Create a Notification Topic (for the Alarm)
If you already have a topic OCID, skip to step 4.4. Build an “Anomalous GPU Usage” Query
Two common ways (pick one):4.1. Simple “High GPU Utilization” (practical anomaly proxy)
Example: GPU utilization > 90% for 5 minutes on any GPU in a compartment:4.2. If you want deviation from baseline (pseudo‑anomaly)
Some tenants use a rule like “> 2× the 1‑hour rolling average”. OCI Monitoring doesn’t yet have a native anomalyDetection() function generally available in all regions, so you usually approximate anomaly with a high threshold or derivative‑type rules. If your tenancy has advanced query features, adapt accordingly; otherwise use 4.1.5. Create the Alarm via OCI CLI
--namespacemust match the namespace from step 2.--query-textis the full alarm expression (no extrawhere/selectsyntax, just Monitoring query).pending-durationis ISO‑8601 (e.g.,PT5M= 5 minutes).
6. Update or Fix an Existing Alarm (if misconfigured)
List alarms:If you paste your actual
metric list output (for GPU) and your tenancy’s region, I can give you the exact QUERY_TEXT line you should use.Using Python
Using Python
Below is a practical way to remediate this in OCI using Python by:
Configure credentials (config file in
You can further filter by
If you share your exact GPU metrics (namespace/metric names as seen in Metrics Explorer) and how you define “anomaly” (thresholds, times), I can adjust the query and Python code precisely.
- Making sure GPU metrics are available.
- Creating a Monitoring Alarm that fires on anomalous GPU usage.
1. Ensure GPU metrics are available
- Use a GPU shape (e.g.
VM.GPU3.1,BM.GPU4.8, etc.). - Ensure the Oracle Cloud Agent is enabled on the instance.
- In OCI Console:
Compute → Instances → your instance → Oracle Cloud Agent → ensure it’s enabled and monitoring plugins are running.
- In OCI Console:
- Confirm GPU metrics exist:
- Monitoring → Metrics Explorer
- Namespace: usually
oci_computeagent - Look for metrics like
GpuUtilization,GpuMemoryUtilization, etc.
2. Concept for “anomalous” GPU usage
OCI doesn’t have a built‑in anomaly engine on GPU metrics. A practical approach for “anomalous GPU usage” is:- Alarm if GPU utilization is too high for too long (e.g. potential abuse / runaway job).
- Optionally add another alarm if utilization is too low during expected workload hours.
3. Python setup
Install and configure the OCI Python SDK:~/.oci/config):4. Python code to create a GPU anomaly alarm
This example creates a high GPU utilization alarm on a specific instance.5. Optional: “Low GPU usage” (expected workload hours)
If “anomalous” for you means “GPU is unexpectedly idle during work”, you can add another alarm:availabilityDomain, displayName, or custom tags in the query if you want one alarm for a group of GPU instances instead of a single resourceId.If you share your exact GPU metrics (namespace/metric names as seen in Metrics Explorer) and how you define “anomaly” (thresholds, times), I can adjust the query and Python code precisely.
Using Terraform
Using Terraform
terraform plan should show either creation of oci_monitoring_alarm.anomalous_gpu_usage_alarm or an in-place update (~) of the existing alarm with the new query (and any other changed fields).
