Alerting

How to set up a real-time alert to trigger every time a certain transaction is completed and include the duration and sourcetype in the email?

debojitb
New Member

Hi,

We are trying to set up an alert which will trigger every time a particular transaction is completed. The alert will send out an email including the duration of that transaction and the sourcetype. What is the simplest way to achieve the above?

Thanks in Advance

0 Karma

sundareshr
Legend

Try something like this

index=* [search index=* earliest=-5m@m status=transactioncomplete | stats count txnId | fields - count] | transaction txnId startswith="status=transactionstart" endswith="status=transactionend" keepevicted=false | table txnId duration

Setup alert based on the results.

0 Karma

debojitb
New Member

I am trying this, but everytime I am getting an error saying the txnId field is invalid in the stats section.

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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