Splunk Search

Help with Heartbeat check

metylkinandrey
Communicator

Good afternoon!
I have six Heartbeat messages coming from the system. All messages from the chain are connected by one: "srcMsgId". Messages have a certain interval, if the interval between messages is higher, that is, one message in a chain (out of six messages) is late, say six seconds (the normal interval is five seconds), then an alarm is triggered. Can you tell me how to do it?
I tried something like this but it's not exactly what you need:

index="bl_logging" sourcetype="testsystem-2" srcMsgId="rwfsdfsfqwe121432gsgsfgd80"

| transaction maxpause=5m srcMsgId Correlation_srcMsgId messageId

| table _time srcMsgId Correlation_srcMsgId messageId duration eventcount

| sort srcMsgId _time

| streamstats current=f window=1 values(_time) as prevTime by subject

| eval timeDiff=_time-prevTime

| delta _time as timediff

| where (timediff)>6

This will only show me the lagging message.

Messages arrive one after another, so we can see their interval and, in theory, take this opportunity to create an alarm when the interval is increased.

Please tell me how can I do this.
Alas I don't selenium in splunk.

 

Tags (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

HI @metylkinandrey,

please try something like this:

index="bl_logging" sourcetype="testsystem-2" srcMsgId="rwfsdfsfqwe121432gsgsfgd80"
| transaction maxevents=2 srcMsgId Correlation_srcMsgId messageId
| where duration>5
| table _time srcMsgId Correlation_srcMsgId messageId duration eventcount

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...