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

Commit ef8cdad

Browse files
Merge pull request #2308 from splunk/trangl-o11ydocs-6195-slo-signalflow-editor
Update SLO custom metric creation flow with SignalFlow editor
2 parents 68d5a5f + bbe8ef6 commit ef8cdad

File tree

3 files changed

+28
-40
lines changed

3 files changed

+28
-40
lines changed
-263 KB
Loading

alerts-detectors-notifications/slo/create-slo.rst

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Follow these steps to create an SLO.
1919
#. From the landing page of Splunk Observability Cloud, go to :strong:`Detectors & SLOs`.
2020
#. Select the :strong:`SLOs` tab.
2121
#. Select :guilabel:`Create SLO`.
22-
#. Configure the service level indicator (SLI) for your SLO.
22+
#. Configure the service level indicator (SLI) for your SLO. You can use a service or any metric of your choice as the system health indicator.
2323

2424
To use a service as the system health indicator for your SLI configuration, follow these steps:
2525

@@ -46,21 +46,22 @@ Follow these steps to create an SLO.
4646
* - :guilabel:`Filters`
4747
- Enter any additional dimension names and values you want to apply this SLO to. Alternatively, use the ``NOT`` filter, represented by an exclamation point ( ! ), to exclude any dimension values from this SLO configuration.
4848

49-
To use a custom metric as the system health indicator for your SLI configuration, follow these steps:
49+
To use a metric of your choice as the system health indicator for your SLI configuration, follow these steps:
5050

51-
.. list-table::
52-
:header-rows: 1
53-
:widths: 40 60
54-
:width: 100%
51+
#. For the :guilabel:`Metric type` field, select :guilabel:`Custom metric` from the dropdown menu. The SignalFlow editor appears.
52+
#. In the SignalFlow editor, you can see the following code sample:
5553

56-
* - :strong:`Field name`
57-
- :strong:`Actions`
58-
* - :guilabel:`Metric type`
59-
- Select :guilabel:`Custom metric` from the dropdown menu
60-
* - :guilabel:`Good events (numerator)`
61-
- Search for the metric you want to use for the success request count
62-
* - :guilabel:`Total events (denominator)`
63-
- Search for the metric you want to use for the total request count
54+
.. code-block:: python
55+
56+
G = data('good.metric', filter=filter('sf_error', 'false'))
57+
T = data('total.metric')
58+
59+
* Line 1 defines ``G`` as a data stream of ``good.metric`` metric time series (MTS). The SignalFlow ``filter()`` function queries for a collection of MTS with value ``false`` for the ``sf_error`` dimension. The filter distinguishes successful requests from total requests, making ``G`` the good events variable.
60+
* Line 2 defines ``T`` as a data stream ``total.metric`` MTS. ``T`` is the total events variable.
61+
62+
Replace the code sample with your own SignalFlow program. You can define good events and total events variables using any metric and supported SignalFlow function. For more information, see :new-page:`Analyze data using SignalFlow <https://dev.splunk.com/observability/docs/signalflow>` in the Splunk Observability Cloud Developer Guide.
63+
64+
#. Select appropriate variable names for the :guilabel:`Good events (numerator)` and :guilabel:`Total events (denominator)` dropdown menus.
6465

6566
.. note:: Custom metric SLO works by calculating the percentage of successful requests over a given compliance period. This calculation works better for counter and histogram metrics than for gauge metrics. Gauge metrics are not suitable for custom metric SLO, so you might get confusing data when selecting gauge metrics in your configuration.
6667

alerts-detectors-notifications/slo/custom-metric-scenario.rst

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,22 @@ Use custom metric as service level indicator (SLI)
1717

1818
From the :guilabel:`Detectors & SLOs` page, Kai configures the SLI and sets up a target for their SLO. Kai follows these steps:
1919

20-
#. Kai wants to use custom metrics as the system health indicators, so they select the :guilabel:`Custom metric` from the :guilabel:`Metric type` menu.
21-
#. Kai enters the custom metrics they want to measure in the following fields:
20+
#. Kai wants to use a Synthetics metric as the system health indicators, so they select the :guilabel:`Custom metric` from the :guilabel:`Metric type` menu.
21+
#. Kai enters following program into the SignalFlow editor:
2222

23-
.. list-table::
24-
:header-rows: 1
25-
:widths: 10 20 30 40
23+
.. code-block:: python
2624
27-
* - Field
28-
- Metric name
29-
- Filters
30-
- Description
25+
G = data('synthetics.run.count', filter=filter('test', 'Monitoring Services - Emby check') and filter('success', 'true'))
26+
T = data('synthetics.run.count', filter=filter('test', 'Monitoring Services - Emby check'))
3127
32-
* - :guilabel:`Good events (numerator)`
33-
- :strong:`synthetics.run.count`
34-
- Kai adds the following filters for this metric:
35-
36-
* :strong:`test = Emby check`
37-
* :strong:`success = true`
38-
- Kai uses the :strong:`success = true` filter to count the number of successful requests for the Emby service on the Buttercup Games website.
28+
Kai defines variables ``G`` and ``T`` as two streams of ``synthetics.run.count`` metric time series (MTS) measuring the health of requests sent to the Emby service. To distinguish between the two data streams, Kai applies an additional filter on the ``success`` dimension in the definition for ``G``. This filter queries for a specific collection of MTS that track successful requests for the Emby service. In Kai's SignalFlow program, ``G`` is a data stream of good events and ``T`` is a data stream of total events.
3929

40-
* - :guilabel:`Total events (denominator)`
41-
- :strong:`synthetics.run.count`
42-
- Kai adds the following filter for this metric:
30+
.. image:: /_images/images-slo/custom-metric-slo-scenario.png
31+
:width: 100%
32+
:alt: This image shows Kai's SLO configuration using the ``synthetics.run.count`` metric and appropriate filters.
4333

44-
* :strong:`test = Emby check`
45-
- Kai uses the same metric name and the :strong:`test = Emby check` filter to track the same Synthetics Browser test. However, Kai doesn't include the :strong:`success = true` dimension filter in order to count the number of total requests for the Emby service on the Buttercup Games website.
34+
35+
#. Kai assigns ``G`` to the :guilabel:`Good events (numerator)` dropdown menu and ``T`` to the :guilabel:`Total events (denominator)` dropdown menu.
4636

4737
#. Kai enters the following fields to define a target for their SLO:
4838

@@ -64,11 +54,6 @@ From the :guilabel:`Detectors & SLOs` page, Kai configures the SLI and sets up a
6454

6555
#. Kai subscribes to receive an alert whenever there is a breach event for the SLO target.
6656

67-
.. image:: /_images/images-slo/custom-metric-slo-scenario.png
68-
:width: 100%
69-
:alt: This image shows Kai's SLO configuration using the ``synthetics.run.count`` metric and appropriate filters.
70-
71-
7257
Summary
7358
=======================
7459

@@ -80,3 +65,5 @@ Learn more
8065
For more information about creating an SLO, see :ref:`create-slo`.
8166

8267
For more information about the Synthetics Browser test, see :ref:`browser-test`.
68+
69+
For more information on SignalFlow, see :new-page:`Analyze data using SignalFlow <https://dev.splunk.com/observability/docs/signalflow>` in the Splunk Observability Cloud Developer Guide.

0 commit comments

Comments
 (0)