Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 1f6091b

Browse files
authored
#124 - create template and example for targets (#125)
* docs: create template and example for targets * chore: make pr changes
1 parent 9d36f56 commit 1f6091b

File tree

2 files changed

+112
-0
lines changed

2 files changed

+112
-0
lines changed

templates/target/targetExample.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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+
![Splunk settings](../images/splunk-target/hec-1.png)
20+
21+
In the list of local inputs, click _HTTP Event Collector_.
22+
23+
![Data inputs](../images/splunk-target/hec-2.png)
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+
![](../images/splunk-target/hec-3.png)
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+
![Adding a Splunk target](../images/splunk-target/create-bridge-1.png)
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+
![Splunk target form](../images/splunk-target/create-bridge-2.png)
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+
![Bridge overview](../images/splunk-target/create-bridge-3.png)
55+
56+
A ready status on the main _Bridges_ page indicates that the Splunk target is ready to accept events.
57+
58+
![Bridge status](../images/bridge-status-green.png)
59+
60+
New events should now be visible in the _Search & Reporting_ app inside Splunk.
61+
62+
![Data summary](../images/splunk-target/search-1.png)
63+
![Data search](../images/splunk-target/search-2.png)
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/

templates/target/targetTemplate.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Event Target for **\_\_\_\_**
2+
3+
This event target sends and receives .......
4+
5+
## Prerequisites
6+
7+
- unordered list of prerequisites
8+
- unordered list of prerequisites
9+
- unordered list of prerequisites
10+
11+
## This should be about a prerequisites
12+
13+
1. number list of each step for the prerequisite
14+
2. number list of each step for the prerequisite
15+
3. number list of each step for the prerequisite
16+
17+
Or if there are no steps, you can add details about each one.
18+
19+
## This should be about a prerequisites
20+
21+
1. number list of each step for the prerequisite
22+
2. number list of each step for the prerequisite
23+
3. number list of each step for the prerequisite
24+
25+
Or if there are no steps, you can add details about each one.
26+
27+
## Deploying an Instance of the Target
28+
29+
Open the Bridge creation screen and add a target of type **\_\_**
30+
31+
Continue adding descriptions and steps needed.
32+
33+
## Event Types
34+
35+
Add the event type info here. This should be a single sentence describing the event.
36+
37+
If schemas are available, add link to those schemas for each type.

0 commit comments

Comments
 (0)