> For the complete documentation index, see [llms.txt](https://docs.bluefletch.com/bluefletch-enterprise/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/sa6-notes/archive/features-archived-notes/events-to-splunk-1.md).

# Events to Splunk

#### Purpose

Sends event data directly from the device to Splunk, in addition to or instead of the default BFE/EMS backend.

#### Location

`data/source/SupportAppRepository.kt` (send logic), `data/source/splunk/` (`SplunkRemoteSource/SplunkApi`), `data/models/splunk/SplunkEventReporting.kt`, `common/SupportAgentConfig.kt` (Splunk config fields).

#### Behavior

`SupportAppRepository.sendEvent()`:

1. If cradleSyncModeEnabled=true, the event is buffered locally instead of sent (see Cradle Sync\<link this to cradle sync>); Splunk forwarding does not apply in this mode. &#x20;
2. Otherwise the event is POSTed to the configured EMS backend (config.eventUrl).&#x20;
3. If that succeeds and config.useSplunk=true, the event is also POSTed to Splunk's HTTP Event Collector (splunkUrl or, if unset, falling back to eventUrl), with header Authorization: Splunk .&#x20;
4. If the initial send fails, the event is queued locally for retry (EventReportingBackupEntry) regardless of the Splunk setting.

### User Guide

1. Enable cradleSyncModeEnabled
2.

#### Configuration

| Configuration    | Type    | Default | Description                                                     |
| ---------------- | ------- | ------- | --------------------------------------------------------------- |
| useSplunk        | Boolean | false   | Enables sending events to Splunk in addition to the EMS backend |
| splunkUrl        | String  | -       | Host/port of the Splunk HTTP Event Collector                    |
| splunkAuthToken  | String  | -       | Auth token defined in the Splunk Event Collector                |
| splunkSource     | String  | -       | Optional Splunk source field override                           |
| splunkSourceType | String  | -       | Optional Splunk sourcetype field override                       |
| splunkApiPath    | String  | -       | API path appended to splunkUrl, e.g. services/collector/raw     |
| ignoreSSLCerts   | Boolean | false   | Ignore SSL certificate issues during Splunk event posting       |

#### Error Handling

| Scenario                                                   | Expected behavior                                                                     | Recovery                                                         |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `splunkUrl/splunkAuthToken` missing while `useSplunk=true` | Splunk POST fails/is skipped (event still delivered to EMS backend if that succeeded) | Fix configuration; no automatic retry specific to Splunk         |
| Splunk endpoint unreachable                                | Logged failure; does not affect the primary EMS backend delivery, which happens first | N/A — Splunk forwarding is fire-and-forget after primary success |
| SSL certificate error                                      | Request fails unless `ignoreSSLCerts=true`                                            | Set `ignoreSSLCerts` or fix the certificate                      |

#### Logging and Troubleshooting&#x20;

**Problem: Events are not appearing in Splunk.**

Check:&#x20;

1. &#x20;Is useSplunk set to true in the effective configuration (visible in Advanced Tools → Config Viewer)?&#x20;
2. Are splunkUrl, splunkAuthToken, and splunkApiPath all populated?&#x20;
3. Is the primary EMS backend send succeeding? (Splunk forwarding only happens after a successful primary send — see step 3 above.)&#x20;
4. Check SupportAppRepository logs for the Splunk POST response code.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bluefletch.com/bluefletch-enterprise/product-guides/sa6-notes/archive/features-archived-notes/events-to-splunk-1.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
