More Info:
The OCI Logging service should have active log groups with enabled logs. Without active logging, security events, errors, and operational issues go unrecorded.Risk 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)
- FedRAMP
- GDPR
- HIPAA
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST
- NIST CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- Reserve Bank of India (RBI) Cyber Security Framework
- Reserve Bank of India (RBI) Master Direction – Information Technology Framework
- 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
Here’s how to remediate “OCI Logging Service Should Have Active Logs Configured” by enabling service logs for the Logging service using the OCI Console:
1. Sign in and choose the right compartment
- Sign in to the OCI Console.
- In the top-left, open the Navigation Menu.
- Make sure you’ve selected the correct region (top-right).
- In the Compartment selector (left side, above the main pane), choose the compartment where you want the Logging service logs to live (often a central “logging” or “security” compartment).
2. Go to Service Logs
- From the Navigation Menu, go to:
Observability & Management → Logging → Service Logs.
3. Enable Logging service logs
- On the Service Logs page, click Enable service logs (or Create service log if you already have some).
-
In the wizard:
- Service: select Logging.
- Resource: choose the relevant resource scope, for example:
tenancy, or- specific resources (like log groups or logging resources) as appropriate to your environment.
- Category: select the categories you want (for the CIS-style requirement, enable all relevant categories such as:
ingestionsearch- any other offered Logging categories for your tenancy).
- Enable log: ensure the log is set to Enabled / Active.
-
Log Group:
- Either select an existing Log Group (recommended: a central one like
security-logsorplatform-logs), or - Click Create new log group, give it a name and (optionally) description, and save.
- Either select an existing Log Group (recommended: a central one like
-
Log Name and Details:
- Specify a Log name (e.g.,
logging-service-ingestion-log). - Set Log retention period according to your policy (e.g., 90 or 365 days).
- Leave Configuration at default unless you need custom settings.
- Specify a Log name (e.g.,
- Click Create (or Enable) to finalize.
4. Verify logs are active
-
Back on Observability & Management → Logging → Service Logs:
- Filter by Service = Logging and your Compartment.
- Confirm each required category shows Status: Enabled / Active.
-
Optionally, generate some Logging activity (e.g., create/modify a log group or log) and:
- Go to Observability & Management → Logging → Logs.
- Open the log you created and check if new entries appear.
Using CLI
Using CLI
Below are the steps to ensure the OCI Logging service has active logs configured for the Monitoring service, using the OCI CLI.Assumptions:
Get the log group OCID from the command output or list them:Save it:
Notes:
Check that:
If you share your exact compartment OCID and region (sanitized as needed), I can return fully filled example commands you can copy-paste.
- You already have OCI CLI installed and configured (
oci setup configdone). - You know your compartment OCID.
1. Set common variables (optional but recommended)
2. Create a Log Group (if you don’t have one)
3. Create an Active Service Log for Monitoring
Create a service log for the Monitoring service and enable it:--log-type "SERVICE"is required for service logs."service": "monitoring"is the key part that enables logs for the Monitoring service.
4. Verify the Log is Active
- The log you created is present.
"is-enabled": true"logType": "SERVICE""service": "monitoring"inconfiguration.source.
If you share your exact compartment OCID and region (sanitized as needed), I can return fully filled example commands you can copy-paste.
Using Python
Using Python
Below is a practical, step‑by‑step way to ensure OCI Logging has active logs configured for the Monitoring service, using Python and the OCI SDK.I’ll assume:
Make sure your
- You already have an OCI tenancy and permissions to manage logging.
- You want to enable service logs for the Monitoring service in a given compartment.
1. Install and Configure the OCI Python SDK
~/.oci/config file is set up (or use instance principal / resource principal as needed):2. Decide the Target Compartment and Log Group
You need:compartment_idwhere Monitoring is being used.- Either:
- an existing Log Group OCID, or
- a name to create a new log group.
3. Python Script: Ensure Log Group Exists and Enable Monitoring Service Log
Below is a minimal example that:- Ensures a log group exists in the compartment.
- Creates a Monitoring service log if it does not exist.
- Ensures it is enabled.
4. Notes / Adjustments
-
Category:
For Monitoring, common categories are typically"api"or"service", but this can vary by region/feature.
You can list available categories via CLI/UI or documentation and adjust thecategoryvariable. -
Resource:
- Leave
resourceempty ("") to log all Monitoring resources in that compartment (where supported). - Or specify a specific OCID (e.g., an alarm OCID) if you want per-resource logging.
- Leave
-
Multiple Compartments / Regions:
- Loop the above logic across compartments/regions if you want all of them covered.
Using Terraform
Using Terraform
OCID_OF_TARGET_COMPARTMENTwith the compartment OCID where you want to store the log group/log.- Optionally set
resourceinsideconfiguration.sourceif you need to scope logs to a specific resource.
service = "monitoring"categoryto an appropriate Monitoring log category.
terraform plan should show + (create) for oci_logging_log_group.AUDIT_LOG_GROUP and oci_logging_log.AUDIT_LOG with is_enabled = true.
