# Splunk

### Overview

Keeper supports event streaming into Splunk Cloud and Splunk Enterprise deployments. External logging is real-time, and new events will appear almost immediately.

An example configuration is displayed below. Note that Host field should only contain the domain portion of the collector URL.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FWRwihFjeiLc7eLc24XdB%2Fimage.png?alt=media&#x26;token=10faf59d-be33-4336-a3f6-78c070e05c4b" alt=""><figcaption><p>Splunk Integration Settings</p></figcaption></figure>

## Splunk Cloud (Self-Service)

Keeper supports the HTTP Event Collector (HEC) feature of Splunk Cloud deployments.

The standard form for the HEC URL in self-service Splunk Cloud is as follows:&#x20;

```
<host>:<port>/<endpoint>
```

In Keeper, you only need to supply the domain portion of the URL. For example:

**Host:** input-prd-p-2dm85a8f6db.cloud.splunk.com\
**Port:** 8088\
**Token:** HEC token generated in Splunk

## Splunk Managed Cloud

Keeper supports the HTTP Event Collector (HEC) feature of Splunk Managed Cloud deployments. The standard form for the HEC URL in managed Splunk Cloud is as follows:

```
http-inputs-<host>:<port>/<endpoint>
```

In Keeper, you only need to supply the domain portion of the URL. For example:

**Host:** http-inputs-prd-p-2dm85a8f6db.splunkcloud.com\
**Port:** 443\
**Token:**  HEC token generated in Splunk

{% hint style="warning" %}
Ensure that your endpoint has the "Indexer Acknowledgement" feature **disabled**.
{% endhint %}

## Splunk Enterprise

Keeper supports the HTTP Event Collector (HEC) feature of Splunk Enterprise and Splunk Cloud deployments.  To configure Keeper with Splunk, a few things to note:

* Instructions on creating a HEC for Keeper can be found on Splunk's documentation here:\
  <https://docs.splunk.com/Documentation/Splunk/8.1.1/Data/UsetheHTTPEventCollector><br>
* Keeper requires that the collector endpoint uses SSL with a valid certificate signed by a certificate authority.  If the collector is not using SSL, Keeper will reject the connection.<br>
* The collector endpoint URI needs to be accessible from Keeper's servers.  See the AllowList section below for a list of IP addresses.

### Step 1. Create Collector

On the Spunk interface, create a new HEC or select an existing collector. &#x20;

![](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MOPVs33jr8YZbWosaGt%2F-MOPc7nigWb0x2c7yPhd%2FScreen%20Shot%202020-12-12%20at%209.43.06%20PM.png?alt=media\&token=3fbd8364-d061-4e9d-96b2-7b6cdcea20b5)

* Generate a token and store it for Step 2.
* In the Global Settings, ensure that "Enable SSL" is selected and ensure that the collector is configured to use SSL.

![Enable SSL on HEC](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MOPVs33jr8YZbWosaGt%2F-MOPbHG1BQFMyEGCJ8VS%2FScreen%20Shot%202020-12-12%20at%2011.58.52%20AM.png?alt=media\&token=267e4249-8081-444b-9ae0-5499acd03f83)

### Step 2. Activate Integration&#x20;

On Keeper, provide the endpoint Host, Port and Token from the HEC. In Keeper, you only need to supply the domain portion of the URL.

<figure><img src="https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LO5CAzpxoaEquZJBpYz%2Fuploads%2FR3PPX6DEHV7kBgyLb7A6%2Fimage.png?alt=media&#x26;token=5289cd20-1da2-4f0f-aafc-b46fec1e047c" alt=""><figcaption><p>Splunk Settings</p></figcaption></figure>

* Click on "Test Connection" to ensure that the connection is successful.  If it's successful, the "Save" button will become active.  If there is a communications error, nothing will happen or you will receive an error message.
* Click "Save" to activate the collector.  Keeper will then show the active status.

![Active Sync Status](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MOPVs33jr8YZbWosaGt%2F-MOPdXkXGQ7BDpjWeuGh%2FScreen%20Shot%202020-12-12%20at%209.09.22%20PM.png?alt=media\&token=49dbfe0f-4b1c-4826-962a-5ee6856c6405)

If the status shows "Paused", it could mean that there was a communications error when transmitting events to the Splunk server.  A common reason for this is because the HEC is not using SSL with a valid certificate signed by a certificate authority (CA).

### Setup Complete!

When SIEM logs are sent from Keeper to Splunk, the data will begin to populate within 15 minutes.

### Troubleshooting

As stated above, the HEC in Splunk Enterprise must be secured with SSL having a certificate that is signed by a certificate authority.  As a way to check this from a Mac or Linux command line, type the following (replacing your endpoint URI and Token):

{% code overflow="wrap" %}

```
$ curl https://splunk.acme-demo.com:8088/services/collector -H "Authorization: Splunk b56ashdd-8b97-443b-1234-abcabcabcabc" -d '{"event": "hello world"}'
```

{% endcode %}

If you receive an error about the SSL certificate like below, then it's not configured correctly.

```
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
```

If you add a "-k" to the curl request to ignore the certificate, you may receive a successful response.  This is a good indicator that the HEC certificate is not valid.

To configure Splunk Enterprise for SSL on the collector, refer to the documentation.  The local/server.conf file should be modified to include the \[sslConfig] section that enables SSL on the splunkd service with a bundled certificate file chain.

```
[sslConfig]
enableSplunkdSSL = true
serverCert = $SPLUNK_HOME/etc/auth/mycompany/my_bundle.pem
```

The certificate file chain (my\_bundle.pem) can be created by concatenating the certificate, private key and CA certs such as below:

```
cat my_server.crt my_server.key ca_certs.crt >> my_bundle.pem
```

For additional details, see the Splunk Enterprise documentation related to securing Splunk with SSL:\
\
<https://docs.splunk.com/Documentation/Splunk/8.1.1/Security/AboutsecuringyourSplunkconfigurationwithSSL>\
\
<https://docs.splunk.com/Documentation/Splunk/8.1.0/Security/Securingyourdeploymentserverandclients>

### Event Display

Once activated, the event logs will stream automatically from Keeper's backend servers to the Splunk HEC. As seen in the screenshot below, the event logs will contain the event type, client application version, IP address, timestamp and username of the Keeper user.

![](https://4290574019-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LO5CAzpxoaEquZJBpYz%2F-MOPlRINN-hZBv8aAbo4%2F-MOPotAy6gPfRCfC_wn7%2FScreen%20Shot%202020-12-12%20at%209.08.16%20PM.png?alt=media\&token=9ece68f6-db9a-4abf-94d1-fcfc51b66c5b)

### Network Routing

Ensure that your Firewall allows traffic from Keeper servers.  See [Firewall Configuration](https://docs.keeper.io/en/enterprise-guide/event-reporting/firewall) page.
