> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/s/splunk.md).

# Splunk

Splunk is a SIEM platform that indexes machine data. OctoXLabs runs a search job on one index and adds every host that appears in it, with the time of its latest log, to the device inventory.

## Use cases

* Find devices that send logs to Splunk and are missing from another tool.

```
Adapters = splunk AND NOT Adapters = falcon-crowdstrike
```

* Find devices that have not sent logs recently.

```
Adapters = splunk AND NOT LastSeen last now-7d/d
```

## Before you begin

### Network

| Source              | Destination                       | Port           | Protocol |
| ------------------- | --------------------------------- | -------------- | -------- |
| OctoXLabs connector | Splunk management port (REST API) | 8089 (default) | HTTPS    |

Port 8089 is the default of the Port parameter. The connector uses HTTPS when Is Secure is on, and HTTP otherwise.

### Required permissions

Not verified. The source instructions do not list the roles or capabilities the account needs. The account must be able to log in to the REST API, run search jobs and read the configured index.

## Create credentials in Splunk

The source instructions do not describe how to create the account. Use a Splunk account that has a username and password and can run searches on the index you want to read.

## Connection parameters

| Parameter      | Required | Type         | Default | Description                                                                                                   |
| -------------- | -------- | ------------ | ------- | ------------------------------------------------------------------------------------------------------------- |
| IP             | Yes      | Text         |         | IP address of the Splunk host.                                                                                |
| Port           | No       | Integer      | 8089    | Splunk management port.                                                                                       |
| Username       | Yes      | Text         |         | Account used to connect to Splunk.                                                                            |
| Password       | Yes      | Password     |         | Password of the account.                                                                                      |
| Index Name     | Yes      | Text         |         | Splunk index to query.                                                                                        |
| Hostname Field | Yes      | Text         |         | Field in the index that holds the host name.                                                                  |
| Fetch Time     | No       | Text         | 24h     | How far back to look from now. Use 24h for hours and 1w for one week.                                         |
| Extra Args     | No       | List of text |         | Extra fields to add to the standard query.                                                                    |
| Query          | No       | Text         |         | Custom query that replaces the standard query. It must start with the search method, for example `\| search`. |
| Is Secure?     | No       | Boolean      | True    | Use HTTPS.                                                                                                    |
| Timeout        | No       | Integer      | 30      | Seconds to wait for API responses.                                                                            |

## Troubleshooting

The connector code does not define adapter specific error messages. Check the connection test result and the connector log.

## Change history

{% hint style="info" %}
Available starting from version 3.0.0.
{% endhint %}
