Skip to content

CarlDownsOracle/oci-sumologic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCI -> Sumologic

Overview

This sample implements a simple architecture for exporting OCI Logs to Sumologic.


OCI

Here are the steps to set up OCI.

OCI Compartment

Name: ABC

Create a compartment to contain the following:

  • Virtual Cloud Network
  • Application + Function
  • Service Connector

OCI Group

Name: functions-developers

Create a user group where we can assign developer related policies.

OCI Policies

See common policies.

Developer Policies

Developer can create, deploy and manage Functions and Applications

See reference

Allow group functions-developers to manage repos in tenancy
Allow group functions-developers to manage serviceconnectors in tenancy
Allow group functions-developers to manage logging-family in tenancy
Allow group functions-developers to manage functions-family in tenancy
Allow group functions-developers to use cloud-shell in tenancy
Allow group functions-developers to use virtual-network-family in tenancy

Allow service faas to read repos in tenancy where request.operation='ListContainerImageSignatures'

Service Connector Policies

Service Connector can access Application + Function, Audit Logs

Allow any-user to manage functions-family in compartment ABC where all {request.principal.type='serviceconnector'}
Allow any-user to manage logging-family in compartment ABC where all {request.principal.type='serviceconnector'}

Function

Quick Start guide on OCI Functions before proceeding.

We will need to build and deploy a function. The above guide takes you step by step.

These are the variables we need to set up in the Function Application.

Here are the supported variables:

Environment Variable Default Purpose
SUMOLOGIC_ENDPOINT not-configured Sumologic API endpoint
MAX_RECORDS_PER_POST 1000 Maximum records to send for each POST. i.e, a batch size.
LOGGING_LEVEL INFO Controls function logging outputs. Choices: INFO, WARN, CRITICAL, ERROR, DEBUG

SEND_AS_JSON_ARRAY

Troubleshooting

FunctionTimeOut

If the Function times out, please change the function timeout setting.


References

Please see these references for more details.

Sumo Logic

OCI IaaS Data Sources

OCI IaaS Enabling Technologies


License

Copyright (c) 2014, 2023 Oracle and/or its affiliates The Universal Permissive License (UPL), Version 1.0

About

Example code for shipping OCI Logs to Sumo Logic

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages