- Overview
- OCI Configuration
- Splunk Cloud Addon Installation and Setup
- Prerequisites for Splunk Cloud Addon for OCI
- Troubleshooting
- Additional Resources
Splunk Cloud Addon for Oracle Cloud Infrastructure
Splunk Cloud users can consume messages from the OCI Logging and Streaming service by authenticating using the Instance Principal feature in your Oracle Cloud Infrastructure deployment. Once connected, users can stream logs from resources in Oracle Cloud Infrastructure (OCI) to an existing or new Splunk Cloud environment.
Refer the screenshot and the points listed below to to create a stream for log data to be written to for Splunk to collect from.
- Open the navigation menu. Under Analytics, click Streaming.
- Click Create Stream.
- Next, select Stream Pool or create a new one.
- Fill in the Stream Name field with a friendly name for your stream such as SIEMLogStream
- Provide a Retention time to meet your needs.
- Provide a Number of Partitions, Total Write Rate, and Total Read Rate based on the amount of data you need to process.
In this step, You will create a log group and configure an example log using Virtual Cloud Network (VCN) Flow Logs.
Refer the screenshot and the points listed below to complete Step 1.
- Open the navigation menu on Oracle Cloud Infrastructure (OCI) console. Under Solutions and Platform, go to Logging, and click on Log Groups.
- Click Create Log Group
- Choose the Compartment where you want to create log group
- Choose a Name and Description that can properly identify your log group
- Click Create
- Next click Logs. The Logs page is displayed.
- Click Enable Service Log. The Enable Resource Log panel is displayed.
- Under Select Resource, under Resource Compartment, choose a compartment you have permission to work in.
- Select a service from the Service. For example: Virtual Cloud Network (subnet)
- Select a resource:
- Under Resource, select a subnet.
- Configure the log:
- In Log Category select a log category to specify the type of log to create. For this example, you will select Flow Logs (All records)
- In Log Name, type a name for the log. For this example, name it as test-flowlog.
- Click Enable Log.
Refer the screenshot and the points listed below to complete Step 3 to create a Service Connector in OCI Logging.
-
Open the navigation menu. Under Logging, click Service Connectors.
-
Choose the Compartment where you want to create the service connector.
-
Click Create Connector.
-
On the Create Service Connector page, fill in the settings as noted below:
- Connector Name: User-friendly name for the new service connector.
- Description: Optional identifier.
- Resource Compartment: The compartment where you want to store the new service connector.
-
Configure Service Connector:
- Select Source: Logging
- Select Target: Streaming
-
Under configure source connection(_Audit Logs):
- Compartment: Select the (root) compartment
- Log Group: Select _Audit
- Check: Include _Audit in subcompartments to collect all compartment logs
-
Under configure source connection(Service Log):
- Click ++Another Log
- Compartment: Select the compartment that contains your log group.
- Log Group: Select the log group created in step 1.
- Leave Blank to collect all Logs in the Log Group
- Logs: Select the log created in step 1 to collect the single service log.
-
Under configure target connection:
- Compartment: Select the compartment that contains your stream.
- Stream: Select the stream created in step 2.
-
If you do not have an inclusive IAM policy, you will see the following message:
- Create default policy allowing this service connector to write to Streaming in compartment
- To resolve this, click the Create button to the right, and it will automatically create a policy for you.
-
To finish the creation click the Create button on the left.
- The Splunk Cloud Addon for OCI supports access by instance principals to avoid storing long-lived tokens. Define a least-privilege policy as shown in the following example:
- Create a Dynamic Group with with the Splunk Instance: https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingdynamicgroups.htm
- Create an OCI IAM policy like the below Allow dynamic-group <Splunk_Dynamic_Group> to use stream-pull in compartment <compartment_of_stream>
Download the Splunk Cloud Addon for OCI from https://splunkbase.com
Directions: https://docs.splunk.com/Documentation/AddOns/released/Overview/Singleserverinstall
- Click Install app from file.
- Locate the downloaded file and click Upload.
- If Splunk Enterprise prompts you to restart, do so.
- Verify that the add-on appears in the list of apps and add-ons. You can also find it on the server at $SPLUNK_HOME/etc/apps/<Name_of_add-on>.
- On the Splunk console, navigate to Settings then Data Inputs
- Click on OCI Logging Cloud
- Click New Refer the screenshot and the points listed below to complete Step 3
- Configure the stream specific information from the information under OCI Configuration or https://docs.oracle.com/en/solutions/logs-stream-splunk/index.html:
-
OCI Logging Stream
- Input Name - Unique name for the input
- Stream OCID - OCID of the Stream ex. ocid1.stream.oc1.i.......
- Stream Endpoint - Endpoint of the Stream ex. https://cell-1.streaming..oci.oraclecloud.com
- OCI Region - OCI region the stream is in ex. us-ashburn-1 (https://docs.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm)
-
OCI Authentication Credentials
- Splunk Cloud Addon uses Instance Principal in OCI Configuration → Step 4: Access Control Select Use Instance Principal. This means the heavy forwarder must be running in OCI.
-
More Settings
- Worker Processes - number of partitions in the OCI Stream created in OCI Configuration → Step 2: Create
- Message Limit - number of messages limit default is 10000
- Retry Interval - number of seconds to sleep after getting a backoff request - default is 90 seconds
- HTTPS Proxy - Proxy server information ex. http://myproxy:port
- Index - Index for use with the OCI (Oracle Cloud Infrastructure) App for Splunk: https://splunkbase.splunk.com/app/5289/
-
- Click Next
- Customer owned Splunk Heavy Forwarder running on an OCI Compute Instance(Instance Principal authentications) forwarding to:
- Splunk Cloud
- When trying to install the Splunk Cloud Addon for OCI get following: "Error connecting to /services/apps/local: The read operation timed out"
- Please follow the instructions here https://community.splunk.com/t5/All-Apps-and-Add-ons/install-add-on-Error-connecting-to-services-apps-local-The-read/m-p/490613
and increase the following timeout in the web.conf [settings] splunkdConnectionTimeout = 600
- Please follow the instructions here https://community.splunk.com/t5/All-Apps-and-Add-ons/install-add-on-Error-connecting-to-services-apps-local-The-read/m-p/490613
- Check your Splunk python3 version
$SPLUNK_HOME/bin/python3 --version
is python 3.7.11 or below - 'Search and Reporting" and search for the following
index=_internal error oci
- Authentication Error will appear here
- Ignore UI related issues
- Visualization App for OCI (Oracle Cloud Infrastructure) App for Splunk: https://splunkbase.splunk.com/app/5289/
Copyright 2023 Splunk Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.