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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...