Splunk Search

how to set time distance between operations in search?

zoyaO
New Member

Hello!
i need to find clients who had operation "registration" and within 24 hours operation "payment"
how can I set the option for search, that one operation was less than 24 hours ago?

Tags (1)
0 Karma
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

So here's a WAG. Search back 24 hours, transaction the events together using the keywords (I assumed these were in your data), and then filter out those with less than 2 events (registration and NOT payment within 24 hours).

your_search_terms earliest=-24h@h | transaction startswith="registration" endswith="payment" patient_id | where eventcount > 1

View solution in original post

alacercogitatus
SplunkTrust
SplunkTrust

So here's a WAG. Search back 24 hours, transaction the events together using the keywords (I assumed these were in your data), and then filter out those with less than 2 events (registration and NOT payment within 24 hours).

your_search_terms earliest=-24h@h | transaction startswith="registration" endswith="payment" patient_id | where eventcount > 1

dwaddle
SplunkTrust
SplunkTrust

then filter those other activities out as part of your base search... perhaps your_search_terms that alacer points out above should include "( registraton OR payment )".

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

your_search_terms "registration" OR "payment" | transaction startswith="registration" endswith="payment" patient_id | where duration < 86400 AND eventcount > 1

0 Karma

zoyaO
New Member

this is not exactly what I'm looking for. I need to find all the customers who have in their history activity "payment" less than 24 hours after the activity "registration". and between these events may be others events (eg change of email) which should not be considered.

0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...