Splunk Search

Drop off count in website.

sandeepmakkena
Contributor

I am working on website sales data where n number of different services are called like CartService, OrderBuildService, CheckoutOfferService,ShippingService and WEB_ORDER_RELEASE. I would like to know drop off rate between any two services.
Say order makes from CartService to Web_Order_release is successfully processed order.
Thanks for your time.

Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

This is a two-step process First count the number of events of each service, in process order. Then use streamstats to find the difference in the count between a service and it predecessor.

... | eval sorter = case(service="CartService", 1, service="OrderBuildService", service="CheckoutOfferService", service="ShippingService", service="Web_Order_release", 1==1, "unknown") 
| stats count values(service) as service by sorter
| streamstats window=2 range(count) as dropoff
| table service count dropoff
---
If this reply helps you, Karma would be appreciated.
0 Karma

sandeepmakkena
Contributor

When I do that, all the stats are going to unknown sorter.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Verify the service names are correct and the field name 'service' is legit.
If that all checks out, try this alternative:

... | eval sorter = case(like(service,"CartService"), 1, like(service,"OrderBuildService"), like(service,"CheckoutOfferService"), like(service,"ShippingService"), like(service,"Web_Order_release"), 1==1, "unknown")
| stats count values(service) as service by sorter
| streamstats window=2 range(count) as dropoff
| table service count dropoff

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...