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

Commit 242a25b

Browse files
Merge pull request #2029 from splunk/trangl-o11ydocs-6187-splunk-platform-integration
Add new Splunk platform integration topic
2 parents 25fdb32 + 0adb4a5 commit 242a25b

File tree

2 files changed

+314
-7
lines changed

2 files changed

+314
-7
lines changed

admin/notif-services/admin-notifs-index.rst

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _admin-notifs-index:
22

33
************************************************************************************
4-
Send alert notifications to third-party services using Splunk Observability Cloud
4+
Send alert notifications to services using Splunk Observability Cloud
55
************************************************************************************
66

77
.. meta::
@@ -19,18 +19,20 @@ Send alert notifications to third-party services using Splunk Observability Clou
1919
Send alerts to ServiceNow<servicenow>
2020
Send alerts to Slack<slack>
2121
Send alerts to Splunk On-Call<splunkoncall>
22+
Send alerts to Splunk platform<splunkplatform>
2223
Send alerts to Webhook<webhook>
2324
Send alerts to xMatters<xmatters>
2425

2526

26-
In addition to sending alert notifications by email (see :ref:`manage-notifications`), you can configure Splunk Observability Cloud to send alert notifications to the following third-party services:
27+
In addition to sending alert notifications by email (see :ref:`manage-notifications`), you can configure Splunk Observability Cloud to send alert notifications to the following services:
2728

29+
The following table shows third-party service integrations
2830

2931
.. list-table::
3032
:header-rows: 1
3133
:widths: 30, 40
3234

33-
* - :strong:`Third-party`
35+
* - :strong:`Third-party service`
3436
- :strong:`Link to documentation`
3537

3638
* - Amazon EventBridge
@@ -57,16 +59,26 @@ In addition to sending alert notifications by email (see :ref:`manage-notificati
5759
* - Slack
5860
- See :ref:`slack`.
5961

60-
* - Splunk On-Call (VictorOps)
61-
- See :ref:`splunkoncall`.
62-
6362
* - Webhook
6463
- See :ref:`webhook`.
6564

6665
* - xMatters
6766
- See :ref:`xmatters`.
6867

69-
You can also configure Splunk Observability Cloud to send alert notifications to a webhook. See :ref:`webhook`.
68+
The following table shows Splunk service integrations:
69+
70+
.. list-table::
71+
:header-rows: 1
72+
:widths: 30, 40
73+
74+
* - :strong:`Splunk service`
75+
- :strong:`Link to documentation`
76+
77+
* - Splunk On-Call (VictorOps)
78+
- See :ref:`splunkoncall`.
79+
80+
* - Splunk platform
81+
- See :ref:`splunkplatform`.
7082

7183
These notification service integrations allow you to configure Splunk Observability Cloud to automatically send alert notifications to these third-party services and webhooks when a condition for a detector alert is met and when the condition clears.
7284

Lines changed: 295 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,295 @@
1+
.. _splunkplatform:
2+
3+
********************************************************************************
4+
Send alert notifications to Splunk platform using Splunk Observability Cloud
5+
********************************************************************************
6+
7+
.. meta::
8+
:description: Configure Splunk Observability Cloud to send alerts to Splunk platform when an alert condition triggers the detector and when the condition clears.
9+
10+
You can configure Splunk Observability Cloud to automatically send alert notifications to Splunk platform when a condition triggers the detector and when a clear condition clears the alert.
11+
12+
.. note::
13+
14+
* To add Splunk platform as a detector alert recipient, you must have administrator access. To get this access,
15+
an existing administrator adds it to your user profile. See :ref:`admin-manage-users` for more information.
16+
17+
To send Splunk Observability Cloud alert notifications to Splunk platform, complete the following configuration tasks:
18+
19+
* :ref:`splunkplatform1`
20+
21+
* :ref:`splunkplatform2`
22+
23+
.. _splunkplatform1:
24+
25+
Step 1: Create a Splunk platform integration in Splunk Observability Cloud
26+
=================================================================================
27+
28+
#. Log in to Splunk Observability Cloud.
29+
#. Open the :new-page:`Splunk platform guided setup <https://login.signalfx.com/#/integrations/splunk-platform>`. Alternatively, you can navigate to the guided setup on your own:
30+
31+
#. In the navigation menu, select :menuselection:`Data Management`.
32+
#. Go to the :guilabel:`Available integrations` tab, or select :guilabel:`Add Integration` in the :guilabel:`Deployed integrations` tab.
33+
#. In the integration filter menu, select :guilabel:`All`.
34+
#. In the :guilabel:`Search` field, search for :guilabel:`Splunk platform`, and select it.
35+
#. Select :strong:`New Integration` to display the configuration options.
36+
37+
#. On the :strong:`Summary` page, select :guilabel:`Next`.
38+
#. On the :strong:`Configure connection` page, enter information into the following fields:
39+
40+
.. list-table::
41+
:header-rows: 1
42+
:widths: 25 75
43+
44+
* - :strong:`Field`
45+
- :strong:`Description`
46+
47+
* - Name
48+
- Give your integration a unique and descriptive name. For information about the downstream use of this name, see :ref:`About naming your integrations <naming-note>`.
49+
50+
* - URL
51+
- Enter the HTTP Event Collector (HEC) URI for your Splunk platform instance. To learn more, see the :new-page:`Send data to HTTP Event Collector <https://docs.splunk.com/Documentation/SplunkCloud/9.1.2312/Data/UsetheHTTPEventCollector#Send_data_to_HTTP_Event_Collector>` section in the *Documentation for Splunk Cloud Platform*.
52+
53+
* - HEC token
54+
- Enter the HTTP Event Collector token that allows access to your Splunk platform instance. To learn more, see :new-page:`Set up and use HTTP Event Collector in Splunk Web <https://docs.splunk.com/Documentation/SplunkCloud/9.2.2403/Data/UsetheHTTPEventCollector>`.
55+
56+
.. note:: Splunk Observability Cloud doesn't support HEC indexer acknowledgement. To use the Splunk platform integration, don't activate indexer acknowledgement for HEC token in your Splunk Enterprise instance.
57+
58+
#. Select :guilabel:`Next`.
59+
#. On the :strong:`Customize message` page, you see the default template for a Splunk platform integration. You can customize your payload to make sure responders have the context needed to resolve the issues. To learn more, see :ref:`splunk-platform-variables`.
60+
#. Select :guilabel:`Next`.
61+
#. Review your integration and select :guilabel:`Save`.
62+
63+
.. _splunkplatform2:
64+
65+
Step 2: Add a Splunk platform integration as a detector alert recipient in Observability Cloud
66+
=====================================================================================================================
67+
68+
To add a Splunk platform integration as a detector alert recipient in Splunk Observability Cloud:
69+
70+
#. Create or edit a detector that you want to configure to send alert notifications using your Splunk platform integration.
71+
72+
For more information about working with detectors, see :ref:`create-detectors` and :ref:`subscribe`.
73+
74+
#. In the :strong:`Alert recipients` step, select :strong:`Add Recipient`.
75+
#. Select :strong:`Splunk platform` and then select the name of the Splunk platform integration you want to use to send alert notifications. This is the integration name you created in :ref:`splunkplatform1`.
76+
#. Activate and save the detector.
77+
78+
Splunk Observability Cloud sends an alert notification to Splunk platform when the detector triggers or clears an alert.
79+
80+
81+
.. _splunk-platform-variables:
82+
83+
Supported variables for Splunk platform integration custom payload
84+
==========================================================================
85+
86+
The following table shows the full list of variables for customization.
87+
88+
.. note::
89+
* Unless otherwise indicated in the description, all variables are of type string.
90+
* When a variable is optional, it means it's not always available. If you use an optional variable that isn't available in the present conditions to construct your payload, Handlebars converts it to an empty string.
91+
92+
.. list-table::
93+
:header-rows: 1
94+
:widths: 30, 40
95+
96+
* - :strong:`Variable`
97+
- :strong:`Description`
98+
99+
* - ``detector``
100+
- Name of the detector.
101+
102+
* - ``detectorUrl``
103+
- URL of the detector, which includes a parameter to select this specific incident.
104+
105+
* - ``detectorId``
106+
- ID of the detector.
107+
108+
* - ``description``
109+
- (Optional) Description of the rule for the detector.
110+
111+
* - ``dimensions``
112+
- A map of the dimensions in the input MTS.
113+
114+
* - ``imageUrl``
115+
- (Optional) URL of the alert preview image.
116+
117+
* - ``incidentId``
118+
- Unique identifier for this alert notification.
119+
120+
* - ``eventType``
121+
- Unique identifier for the version of the detector that sent the notification.
122+
123+
* - ``rule``
124+
- Name of the detector rule that triggered the alert.
125+
126+
* - ``severity``
127+
- Severity level of the rule determined by Splunk Observability Cloud. Use this variable in your custom payload.
128+
129+
* - ``runbookUrl``
130+
- Runbook URL specified in this rule.
131+
132+
* - ``tip``
133+
- Tip specified in this rule.
134+
135+
* - ``messageTitle``
136+
- Notification title for this rule.
137+
138+
* - ``messageBody``
139+
- Notification message for this rule.
140+
141+
* - ``detectOnCondition``
142+
- (Optional) Criteria for metric data and detection criteria for the detector rule, written in SignalFlow format.
143+
144+
* - ``detectOffCondition``
145+
- (Optional) Clear metric data and detection criteria in this rule, in SignalFlow format.
146+
147+
* - ``status``
148+
- Status of the incident, kept for backwards compatibility. Use ``statusExtended`` for more detailed information. Valid values include:
149+
150+
* ``anomalous``: the alert is firing because the detect conditions are met.
151+
* ``ok``: the alert is cleared because the detect conditions are no longer met or the clear conditions, if any, are met.
152+
153+
* - ``statusExtended``
154+
- New variable for status of the incident. Use in place of ``status``. Valid values include:
155+
156+
* ``anomalous``: the alert is firing because the detect conditions are met.
157+
* ``ok``: the alert is cleared because the detect conditions are no longer met or the clear conditions, if any, are met.
158+
* ``manually resolved``: a user resolves the alert through the UI or the API.
159+
* ``stopped``: the detector that triggered the alert is edited or deleted.
160+
161+
* - ``timestamp``
162+
- Time the event occurred, in ISO 8601 format.
163+
164+
* - ``inputs``
165+
- Map of the inputs involved in this rule. This variable is of type array. For more information, see :ref:`inputs-array`.
166+
167+
* - ``sf_schema``
168+
- The schema version for this event. The value is always set to ``2``.
169+
170+
* - ``orgId``
171+
- The organization ID of the Splunk Observability Cloud org where the alert is coming from.
172+
173+
* - ``originatingMetric``
174+
- Name of the metric that triggered the alert.
175+
176+
* - ``src``
177+
- The source of the alert, as defined by the following dimensions. The first dimension value available is set as the source of the alert.
178+
179+
* ``k8s.pod.name``
180+
* ``k8s.cluster.name``
181+
* ``k8s.node.name``
182+
* ``k8s.container.name``
183+
* ``host``
184+
* ``host.name``
185+
* ``aws_arn``
186+
* ``gcp_standard_id``
187+
* ``azure_resource_id``
188+
* ``sf_service``
189+
* ``sf_workflow``
190+
* ``sf_operation``
191+
* ``test``
192+
193+
.. _inputs-array:
194+
195+
``inputs`` array
196+
-----------------------------
197+
198+
Each object in the ``inputs`` array is named after the program variable it’s bound to. If an object isn’t bound to a program variable, it uses a name like ``_S0``, ``_S1``, and so on.
199+
200+
Each input object contains the following elements:
201+
202+
.. list-table::
203+
:header-rows: 1
204+
:widths: 30, 40
205+
206+
* - :strong:`Element`
207+
- :strong:`Description`
208+
209+
* - ``key``
210+
- (Optional) Map of the dimensions of the input signal. This element might be empty if there are no dimensions; for example, if the input was a static value and not a comparison against scalar values.
211+
212+
* - ``value``
213+
- Value of the input when the alert triggered or when it cleared.
214+
215+
216+
* - ``fragment``
217+
- (Optional) This is the fragment of the SignalFlow program that represents the input. This element might not be present for some detectors or for static, anonymous inputs.
218+
219+
.. _helper-functions:
220+
221+
Helper functions
222+
------------------------
223+
224+
Apart from using template variables to customize your payload, you can also use the following helper functions to make sure the right value is set on the outgoing alert.
225+
226+
.. list-table::
227+
:header-rows: 1
228+
:widths: 20, 40, 40
229+
230+
* - :strong:`Function`
231+
- :strong:`Description`
232+
- :strong:`Examples`
233+
234+
* - ``coalesce``
235+
- Returns the first value that is not empty. You can use this function to specify the desired order of dimensions for the ``src`` variable.
236+
- | {{{coalesce dimensions.host dimensions.aws_arn ‘No ID Found!’}}}
237+
| This example sets ``dimensions.host`` on the alert if it is present, ``dimensions.aws_arn`` as a second option, and the string ``“No ID Found!”`` if neither host nor AWS ID is present.
238+
239+
* - ``severityDecoder``
240+
- Returns ``2`` if the status variable is ``ok``. Otherwise, the function checks and decodes the severity variable:
241+
242+
* ``1``: Info
243+
* ``3``: Warning
244+
* ``4``: Minor
245+
* ``5``: Major
246+
* ``6``: Critical
247+
* ``empty``: Unknown severity
248+
249+
- | ``{{{severityDecoder ok='ok' Major='not_ok' default='empty'}}}``
250+
| This example overrides the default return values and customizes them.
251+
252+
* - ``encodeString``
253+
- Escapes quote and newline characters in a string.
254+
- ``{{{encodeString messageTitle}}}``
255+
256+
* - ``notEmpty``
257+
- Adds text to a payload only if the value specified is not empty map. This function only works with the ``inputs`` and ``dimensions`` variables.
258+
- | This example only prints if dimensions is not empty: {{#notEmpty dimensions}}
259+
| ``{{/notEmpty}}``
260+
261+
* - ``json``
262+
- Converts a string to a raw JSON value. Use this function to turn text from a detector into a JSON payload that can be evaluated in third-party integrations.
263+
- ``{{{json dimensions}}}``
264+
265+
* - ``substring``
266+
- Returns a new character sequence that is a subsequence of this sequence. The subsequence starts with the character at the specified index and ends with the character at the second to last index.
267+
- | ``{{substring var 1}}``
268+
| ``{{substring var 1 3}}``
269+
270+
* - ``abbreviate``
271+
- Truncates a string if it is longer than the specified number of characters. Minimum abbreviation width is 4.
272+
- ``{{abbreviate long_str 5}}``
273+
274+
* - ``replace``
275+
- Replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence.
276+
- ``{{replace abbreviated '...' ''}}``
277+
278+
* - ``eq``
279+
- Checks if two elements are equal.
280+
- | ``{{#eq a b}}yes{{else}}no{{/eq}}``
281+
| ``{{#eq a 2}}yes{{else}}no{{/eq}}``
282+
283+
284+
285+
286+
287+
288+
289+
290+
291+
292+
293+
294+
295+

0 commit comments

Comments
 (0)