> For the complete documentation index, see [llms.txt](https://docs.strongdm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.strongdm.com/admin/audit/logs/scenarios/export-to-splunk.md).

# Send Local Logs to Splunk

**Scenario:** you want to save gateway/relay logs to a Splunk Indexer. This guide presents a simple method to send all gateway/relay logs to a Splunk Indexer.

{% hint style="info" %}
As with all gateway/relay logs, the logs stored on the gateway/relay will not include Admin UI activities, which can be accessed via the `sdm audit activities` command.
{% endhint %}

### Setting up the export

1. Enable relay logging in the Admin UI under *Settings / Log Encryption & Storage*. Ensure logging is set to FILE.
2. Configure your indexer to receive the date from the forwarder:

   ![](/files/5FTJrrYkyPvu6snh52LE) ![](/files/iU902c94GlbkSY5Vpped) ![](/files/OXxs5DYt6sznwDLvrj95)
3. Create an index for StrongDM, called "sdm\_index" in this example:

   ![](/files/ulNqDXIACuCZBwekhpA1) ![](/files/c45guZj9QnRGRExfdpCi) ![](/files/bgXvQaPVKMFIfoZs5DsP)
4. Install the forwarder, then configure the monitor.

   ```bash
   wget -O splunkforwarder-8.1.3-63079c59e632-linux-2.6-x86_64.rpm 'https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=8.1.3&product=universalforwarder&filename=splunkforwarder-8.1.3-63079c59e632-linux-2.6-x86_64.rpm&wget=true'
   sudo rpm -ihv splunkforwarder-8.1.3-63079c59e632-linux-2.6-x86_64.rpm
   export PATH=$PATH:/opt/splunkforwarder/bin
   splunk start
   ```

{% hint style="info" %}
You'll be asked to set the admin password on the first run of `splunk start`.
{% endhint %}

```bash
splunk list forward-server
Active forwards:
    ec2-34-210-43-66.us-west-2.compute.amazonaws.com:9997
Configured but inactive forwards:
    None

splunk add monitor /home/ec2-user/.sdm/logs/ -index sdm_index -sourcetype sdm

splunk list monitor
[...]
/home/ec2-user/.sdm/logs
        /home/ec2-user/.sdm/logs/relay.1616439304.0.log
        /home/ec2-user/.sdm/logs/relay.1616439311.0.log
        /home/ec2-user/.sdm/logs/relay.1616595755.0.log
        /home/ec2-user/.sdm/logs/relay.1616604787.0.log
        /home/ec2-user/.sdm/logs/relay.1616652500.0.log
[...]   
```

5\. You can search for "sdm\_index" on the indexer's search.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.strongdm.com/admin/audit/logs/scenarios/export-to-splunk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
