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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...