More Info:
Monitor ConfigurationChange events in the Audit service. Tracking configuration drift ensures that unauthorized modifications to critical infrastructure are reviewed and reverted if necessaryRisk Level
MediumAddress
Compliance, SecurityCompliance Standards
- APRA CPS 234 (Australia)
- AWS Well Architected Framework
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS AWS
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- Essential 8
- HITRUST CSF
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SOC2
- 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 the exact console steps to get alerts when the OCI Monitoring configuration (alarms) changes, using OCI Events + Notifications. This is the supported way to alert on configuration changes; Monitoring alarms themselves are for metric thresholds, not config changes.
This configuration satisfies the requirement that OCI Monitoring configuration changes (alarm create/update/delete/etc.) generate alerts, implemented fully via the OCI Console.
1. Create (or identify) a Notifications Topic
- Sign in to the OCI Console.
- Open the navigation menu → Developer Services → Notifications.
- Click Topics.
- Click Create Topic.
- Name: e.g.
monitoring-config-changes-topic - Description: e.g.
Alerts for Monitoring alarm configuration changes
- Name: e.g.
- Click Create.
Add a Subscription (e.g., email)
- On the topic details page, click Create Subscription.
- Protocol: Email (or HTTPS/Slack/other as per your environment).
- Email: enter your email.
- Click Create.
- Confirm the subscription from the email you receive.
2. Create an Event Rule for Monitoring Configuration Changes
- Open the navigation menu → Observability & Management → Events Service → Rules.
- Click Create Rule.
-
Fill in:
- Rule Name: e.g.
monitoring-config-change-rule - Description: e.g.
Triggers when Monitoring alarms are created/updated/deleted - State: Enabled
- Compartment: pick the compartment where your Monitoring alarms live (or a higher-level/root compartment if needed).
- Rule Name: e.g.
-
Under Rule Conditions:
- In Service, select Monitoring.
- In Event Type, add the following (at minimum):
Alarm - CreateAlarm - UpdateAlarm - Delete- (Optionally also:
Alarm - Move Compartment,Alarm - Enable,Alarm - Disable, depending on your policy.)
-
Under Actions, click + Add Action:
- Action Type: Notifications.
- Topic: select the topic you created earlier (e.g.
monitoring-config-changes-topic).
- Click Create Rule.
3. Test the Alert
- Go to Observability & Management → Monitoring → Alarm Definitions.
- In the same compartment specified in the rule, create a new alarm or update an existing alarm (e.g., change threshold).
- Within a short time, you should receive a notification (email or whatever protocol you chose).
This configuration satisfies the requirement that OCI Monitoring configuration changes (alarm create/update/delete/etc.) generate alerts, implemented fully via the OCI Console.
Using CLI
Using CLI
In OCI you detect configuration changes with Events + Notifications, not directly with Monitoring metrics.
Below are minimal, CLI‑only steps to create an email alert for configuration changes.
If this works, you’re good.You will need:
Capture the returned
Then go to your email and confirm the subscription.
Adjust to your needs (add/remove event types).Note: the Now create the Events rule that sends these events to the Notifications topic:This is the key step that provides “configuration change alerting” for your OCI environment.
If you need a pure Monitoring alarm on top of Events (for example, on failures of event delivery), you can then create a Monitoring alarm on the
Below are minimal, CLI‑only steps to create an email alert for configuration changes.
0. Prerequisites
Make sure your OCI CLI is configured:TENANCY_OCID– your tenancy OCIDCOMPARTMENT_OCID– compartment to watch for changesREGION– e.g.us-ashburn-1- Your email address for notifications
1. Create a Notifications Topic
id as TOPIC_OCID:2. Add an Email Subscription
3. Create an Events Rule for Configuration Changes
Define the rule condition JSON in a file, e.g.config-change-condition.json.Example that triggers on any configuration‑changing events (create, update, delete) for common services (compute, network, block volume, IAM, etc.).Adjust to your needs (add/remove event types).
config-change-condition.json:$COMPARTMENT_OCID will not be expanded inside JSON automatically. Replace it manually or generate the file via cat <<EOF as shown below.Create the file with environment expansion:4. (Optional) Verify by Making a Test Change
For example, update the display name of a test instance or create a small VCN; confirm:- An event is generated (Audit/Event service)
- You receive an email from Notifications.
If you need a pure Monitoring alarm on top of Events (for example, on failures of event delivery), you can then create a Monitoring alarm on the
oci_events namespace, but for “configuration change alarms” per CIS‑style requirements, the above Events + Notifications setup is the standard remediation.Using Python
Using Python
Below is a concise, step‑by‑step way to remediate “OCI Monitoring Should Have Configuration Change Alarm Configured” using Python and the OCI SDK.This fires when any audited API call (including configuration changes) happens in the compartment during a 5‑minute window.You can filter further by event type or target if desired (e.g. only for network changes) by using dimensions in the query, but this is the basic pattern.Update the
This script, once run, will create an OCI Monitoring alarm that alerts (via the provided Notification topic) whenever configuration‑related activity is detected by Audit in the target compartment, fulfilling the “configuration change alarm” requirement.
1. Prerequisites
- Python 3 installed
ociSDK installed:- OCI config file at
~/.oci/config(or custom path), with:- tenancy OCID
- user OCID
- fingerprint
- private key path
- region
- You already know:
- The compartment OCID where you want this alarm.
- An OCI Notification topic OCID for sending alarm notifications (SNS‑like).
2. Metric & Alarm Concept
We’ll create an alarm on the Audit logs metric. Example query:3. Python Script to Create the Alarm
4. Optional: Tighten the “Configuration Change” Scope
If your security requirement is only to alert on configuration‑type actions (not all API calls), refine the query with dimensions. For example, to only watch for VCN changes:alarm_query string in the script accordingly.This script, once run, will create an OCI Monitoring alarm that alerts (via the provided Notification topic) whenever configuration‑related activity is detected by Audit in the target compartment, fulfilling the “configuration change alarm” requirement.
Using Terraform
Using Terraform
compartment_id; updating query, is_enabled, or destinations is an in-place update.To verify, terraform plan should show either a new oci_monitoring_alarm.configuration_change_alarm being created or an existing alarm updated so that its namespace is oci_audit and its query matches the configuration-change condition you require (e.g., audit.events[1m]{eventType = "com.oraclecloud.audit.config.change"}.sum() > 0).
