Splunk Search

diff between numbers

indeed_2000
Motivator

Hi
need to compare total numbers if they are different show table that present them
23:57:05.253 app module: PACK: Total:[1010000] from server1 Total:[C000001010000]
23:57:05.254 app module: PACK: Total:[1010000] from server1 Total:[C000001000000]

diff=second total - first total

expected output:
Time                                 diff
23:57:05.254        10000

any idea?

Thanks,

0 Karma
1 Solution

indeed_2000
Motivator

after workaround do this with eval command.

index="myindex"

| eval diff=(total2 - total1)

| table _time diff 

View solution in original post

0 Karma

indeed_2000
Motivator

after workaround do this with eval command.

index="myindex"

| eval diff=(total2 - total1)

| table _time diff 

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...