|
| 1 | +# Event Target for Splunk |
| 2 | + |
| 3 | +This event target receives arbitrary [CloudEvents][ce] over HTTP and sends them to a [Splunk HTTP Event Collector][hec] |
| 4 | +in a [JSON format][ce-jsonformat]. |
| 5 | + |
| 6 | +## Prerequisites |
| 7 | + |
| 8 | +- HTTP Event Collector Input |
| 9 | + |
| 10 | +## HTTP Event Collector Input |
| 11 | + |
| 12 | +In order to be able to use the TriggerMesh event target for Splunk, and administrator must: |
| 13 | + |
| 14 | +1. Enable the [HTTP Event Collector][hec] data input in the Splunk installation. |
| 15 | +1. Create a token for receiving data over HTTP. |
| 16 | + |
| 17 | +To do so, open the Splunk web console, then navigate to _Settings > Data > Data inputs_. |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +In the list of local inputs, click _HTTP Event Collector_. |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +Click _New token_ in order to generate a new token with custom settings, then take note of the value of that token. The |
| 26 | +default HEC token (`splunk_hec_token`) is also suitable for use with the TriggerMesh event target for Splunk. |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +This procedure is described in more details in the Splunk documentation: [Set up and use HTTP Event Collector in Splunk |
| 31 | +Web ][hec]. |
| 32 | + |
| 33 | +## Deploying an Instance of the Target |
| 34 | + |
| 35 | +Open the Bridge creation screen and add a target of type `Splunk`. |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +In the Target creation form, give a name to the event Target and add the following information: |
| 40 | + |
| 41 | +- **HEC Endpoint**: URL of the HTTP Event Collector (HEC). This URL varies depending on the type of Splunk installation |
| 42 | + (Enterprise, self-service Cloud, managed Cloud). Only the scheme, hostname, and port (optionally) are evaluated, the |
| 43 | + URL path is trimmed if present. |
| 44 | +- **HEC Token**: Reference to a [TriggerMesh secret](../guides/secrets.md) containing a token for authenticating requests against |
| 45 | + the HEC, as described in the previous section. |
| 46 | +- [**Index**][index]: Name of the index to send events to. When undefined, events are sent to the default index defined |
| 47 | + in the HEC token's configuration. |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +After clicking the `Save` button, you will be taken back to the Bridge editor. Proceed to adding the remaining |
| 52 | +components to the Bridge, then submit it. |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | +A ready status on the main _Bridges_ page indicates that the Splunk target is ready to accept events. |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +New events should now be visible in the _Search & Reporting_ app inside Splunk. |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +For more information about using Splunk, please refer to the [Splunk documentation][docs]. |
| 66 | + |
| 67 | +## Event Types |
| 68 | + |
| 69 | +The Splunk event target can consume events of any type. |
| 70 | + |
| 71 | +[ce]: https://cloudevents.io/ |
| 72 | +[ce-jsonformat]: https://github.com/cloudevents/spec/blob/v1.0/json-format.md |
| 73 | +[hec]: https://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector |
| 74 | +[index]: https://docs.splunk.com/Documentation/Splunk/latest/Indexer/Aboutindexesandindexers |
| 75 | +[docs]: https://docs.splunk.com/ |
0 commit comments