Skip to main content

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

Medium

Address

Compliance, Security

Compliance 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

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

  1. Sign in to the OCI Console.
  2. In the top-left, open the Navigation Menu.
  3. Make sure you’ve selected the correct region (top-right).
  4. 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

  1. From the Navigation Menu, go to:
    Observability & Management → Logging → Service Logs.

3. Enable Logging service logs

  1. On the Service Logs page, click Enable service logs (or Create service log if you already have some).
  2. 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:
      • ingestion
      • search
      • any other offered Logging categories for your tenancy).
    • Enable log: ensure the log is set to Enabled / Active.
  3. Log Group:
    • Either select an existing Log Group (recommended: a central one like security-logs or platform-logs), or
    • Click Create new log group, give it a name and (optionally) description, and save.
  4. 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.
  5. Click Create (or Enable) to finalize.
Repeat steps 1–5 for each Logging service log category you want enabled to satisfy the “active logs configured” requirement.

4. Verify logs are active

  1. Back on Observability & Management → Logging → Service Logs:
    • Filter by Service = Logging and your Compartment.
    • Confirm each required category shows Status: Enabled / Active.
  2. 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.
This ensures the OCI Logging service has active service logs configured, resolving the misconfiguration for OCI Logging Monitoring via the console.
Below are the steps to ensure the OCI Logging service has active logs configured for the Monitoring service, using the OCI CLI.Assumptions:
  • You already have OCI CLI installed and configured (oci setup config done).
  • You know your compartment OCID.


2. Create a Log Group (if you don’t have one)

Get the log group OCID from the command output or list them:
Save it:

3. Create an Active Service Log for Monitoring

Create a service log for the Monitoring service and enable it:
Notes:
  • --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

Check that:
  • The log you created is present.
  • "is-enabled": true
  • "logType": "SERVICE"
  • "service": "monitoring" in configuration.source.

If you share your exact compartment OCID and region (sanitized as needed), I can return fully filled example commands you can copy-paste.
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:
  • 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

Make sure your ~/.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_id where 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:
  1. Ensures a log group exists in the compartment.
  2. Creates a Monitoring service log if it does not exist.
  3. 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 the category variable.
  • Resource:
    • Leave resource empty ("") 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.
  • Multiple Compartments / Regions:
    • Loop the above logic across compartments/regions if you want all of them covered.
This pattern remediates the finding “OCI Logging Service Should Have Active Logs Configured” by ensuring there is an active, enabled service log for the Monitoring service in the target compartment.
Substitute:
  • OCID_OF_TARGET_COMPARTMENT with the compartment OCID where you want to store the log group/log.
  • Optionally set resource inside configuration.source if you need to scope logs to a specific resource.
This change does not replace existing resources; it adds a new log group and an enabled log.For Monitoring service logs instead of Audit, keep the same structure but set:
  • service = "monitoring"
  • category to an appropriate Monitoring log category.
Verification: terraform plan should show + (create) for oci_logging_log_group.AUDIT_LOG_GROUP and oci_logging_log.AUDIT_LOG with is_enabled = true.