Skip to main content
Splunk Lantern

Payment SLA amounts

​​The table below explains in detail the steps of a Splunk Enterprise or Splunk Cloud Platform search to help you understand the amounts involved in payment processes that didn't meet their SLA. For more information, review the use case monitoring payment responses.

Some commands, parameters, and field names in the searches below may need to be adjusted to match your environment.  In addition, to optimize the searches shown below, you should specify an index and a time range when appropriate.

Splunk recommends that customers look into using data models, report acceleration, or summary indexing when searching across hundreds of GBs of events in a single search. The searches provided here are a good starting point, but depending on your data, search time range, and other factors, more can be done to ensure that they scale appropriately.  

Splunk Search Explanation
|sourcetype=<payment processing data> Search only your payment processing data.
|eval _time=strptime(_time, "%Y/%m/%d %H:%M:%S") Parse the time stamp into a UNIX time value.
|sort _time Sort the results from oldest to newest.
|stats count first(amount) AS amount  first(_time) AS first last(_time) AS last BY sessionID Display the amounts processed, as well as the times of the payment request and response. Then group the payments by their unique identifier.
|where count>1 Filter results to those where the count is greater than 1.
|eval duration=last-first Create a duration field that is equal to the last minus first time.
|rangemap field=duration Met_SLA=1-1500 Near_SLA=1501-2200 Missed_SLA=2201-10000 default=Missed_SLA Set ranges for payment durations that missed SLA, met SLA, and nearly missed SLA.
|chart sum(amount) AS TotalAmount BY range Display the total monetary amount for the transactions that fall into each range.
|eval TotalAmount=tostring(TotalAmount,"commas") Convert the total amount to a string rounded to two values, using a comma when needed.