Build a SLI
This guide walks you through creating a Service Level Indicator (SLI) in slaOS
Last updated
This guide walks you through creating a Service Level Indicator (SLI) in slaOS
Last updated
SLIs are key metrics that measure specific aspects of your service's performance and reliability. By following these steps, you'll learn to configure effective SLIs to monitor your service quality.
Before writing a SLI query, the engine asks you to state whether you are defining a Value SLI (e.g. latency, MTTD) or a Percentage SLI (e.g. uptime, error rate). It does so to allow for maximum flexibility in terms of the Objective (SLO) you get to define later, as the two streams demand different treatment to produce error free results.
Follow these steps to create a Value Service Level Indicator (SLI):
Find and click on "Indicators" in the side navigation bar
Click the "+ New SLI" button to open the Create SLI modal
Choose "Value" as the type of SLI you'll be building
Choose a metric query, aggregator, and filter
Allowed aggregators: COUNT
, SUM
, MAX
, MIN
, AVG
n/a
is also an acceptable input; this will output an array of metrics without any aggregation
You can create multiple queries by clicking "+ New Query" and add a formula in the formula box to define the relationship between them.
Operators allowed on the formula builder: *
, /
, +
, -
, <
, >
, <=
, >=,
=
, !=
Provide a clear, descriptive name for your SLI and a description to explain its purpose and function.
Click the "Save" button to create your new Value SLI.
QUERY
A: SELECT {n/a
} {latency_metric
} FROM {key
} WHERE {status_code < 500
}
Unit ms
Example implementation 👇
This SLI will output a stream of latencies like {121,90,48,291,44,29,90,81...}
seconds
Follow these steps to create a Percentage Service Level Indicator (SLI):
Find and click on "Indicators" in the side navigation bar
Click the "+ New SLI" button to open the Create SLI modal
Choose "Percentage" as the type of SLI you'll be building
Choose a metric query, aggregator, and filter
Allowed aggregators: COUNT
, SUM
, MAX
, MIN
, AVG
n/a
is also an acceptable input; this will output an array of metrics without any aggregation
You can create multiple queries by clicking "+ New Query" and add a formula in the formula box to define the relationship between them
Operators allowed on the formula builder: *
, /
, +
, -
, <
, >
, <=
, >=,
=
, !=
Provide a clear, descriptive name for your SLI and a description to explain its purpose and function
Click the "Save" button to create your new Percentage SLI
QUERY
A: SELECT {count
} {*
} FROM {key1
} WHERE {status_code < 500
}
B: SELECT {count
} {*
} FROM {key2
}
Formula : A/B
Example implementation 👇
The SLI will output a ratio, where the numerator counts all the events where the status code is less than 500 and the denominator is all events.