How to calculate success rate using SPL in Splunk

date
Aug 28, 2022
slug
calculate-success-rate-in-splunk
status
Published
tags
Tutorial
Log
Splunk
SPL
summary
type
Post
Today I will introduce three possible ways to calculate success rate using SPL in Splunk.

Calculate success rate of total logs depending on log level

For example, here I will count all the log entries as Total, while entries that have log level “ERROR” as Failures.
Total, FailCount, FailureRate, SuccessCount, SuccessRate
Total, FailCount, FailureRate, SuccessCount, SuccessRate

Calculate success rate of specific HTTP request

For example, here I will calculate the success rate of requests that create user.
TotalCreateUser, SuccessRate
TotalCreateUser, SuccessRate

Calculate success rate within a specific time interval

For example, here I will calculate the success rate per day of requests that create user.
Success rate per day
Success rate per day

References


© Foy Wan 2022 - 2025