Enabling Service Logs

In this article, we delve into the intricacies of service logs, exploring their format, structure, and diverse applications across various Oracle Cloud Infrastructure (OCI) services.

The Anatomy of a Service Log

Service logs within OCI adhere to a standardized format, employing JSON-based event structures for seamless correlation between logs and associated resources. A typical log entry comprises three fundamental sections:

  • Unified Envelope: This section encapsulates essential metadata such as the specification version, log category, resource source, unique identifiers, and timestamps.
  • Oracle-specific Metadata: Providing additional context, Oracle-specific metadata includes identifiers such as log OCIDs, log group OCIDs, tenant OCIDs, compartment IDs, and ingestion timestamps.
  • Data Section: Central to the log entry, the data section furnishes detailed information on the triggering event, encompassing attributes specific to the event category.

Exploring Log Categories

  1. DevOps Deployment Logs:
    • These logs pertain to the deployment lifecycle, offering insights into deployment OCIDs, pipeline IDs, deployment stage IDs, and event messages.
  2. Object Storage Logs:
    • Object storage logs revolve around activities within storage buckets, categorized into write access events (e.g., file uploads) and read access events (e.g., file downloads).
  3. Load Balancer Logs:
    • Load balancer logs capture traffic distribution details, including access logs for request handling and error logs for monitoring and troubleshooting.
  4. VCN Flow Logs:
    • Vital for network security and monitoring, VCN flow logs track traffic flows in and out of Virtual Network Interfaces (vNICs), aiding in connectivity troubleshooting.

Application and Analysis

  • Utilizing Log Data: Leveraging the wealth of information within log entries, users can filter logs based on various criteria, such as bucket names, client IP addresses, or log message contents.
  • Practical Examples:
    • Object storage logs reveal upload statuses (e.g., successful uploads denoted by HTTP status code 200).
    • Load balancer error logs offer insights into backend server health checks, including status transitions from “Healthy” to “Unhealthy”.
    • VCN flow logs facilitate identification of rejected traffic requests, aiding in security rule evaluation and troubleshooting.

Conclusion

In conclusion, understanding the structure and content of service logs is paramount for effective management, monitoring, and troubleshooting within OCI. By comprehensively exploring log formats and exemplifying their applications across various services, users can harness the power of log data to enhance operational efficiency and maintain robust system performance.

Previous
Understanding Log Groups
Next
Custom Logs