Splunk Search

search sequential numbers

fizzletwist
Engager

How can I search in Splunk to find events which contain sequential numbers in a given field?

0 Karma
1 Solution

kristian_kolb
Ultra Champion

Well, it depends on whether you want to sort your boobs..er..numbers at search time (sequentially), which could be accomplished with the sort command, e.g.;

your search | table _time boobs | sort boobs

If you want to ensure that you have sequential boobs without sorting, i.e. you want to know that they're in sequence from the start, you should have a look at the delta command, which will show the difference between the current and previous value. Thus it should be a numerical value.

your search | table _time boobs | delta boobs

_time          boobs     delta(boobs)
2013-01-01     32        
2013-01-02     33        1
2013-01-03     34        1
2013-01-04     35        1
2013-01-05     30        -5

Hope this helps,

K

View solution in original post

jonuwz
Influencer

is 1 number in a field, and sequential across events
or
sequential numbers in a field in 1 event ?

0 Karma

Rob
Splunk Employee
Splunk Employee

Nice tag, I think this splunk answer is now near the top of google search results

0 Karma

kristian_kolb
Ultra Champion

Well, it depends on whether you want to sort your boobs..er..numbers at search time (sequentially), which could be accomplished with the sort command, e.g.;

your search | table _time boobs | sort boobs

If you want to ensure that you have sequential boobs without sorting, i.e. you want to know that they're in sequence from the start, you should have a look at the delta command, which will show the difference between the current and previous value. Thus it should be a numerical value.

your search | table _time boobs | delta boobs

_time          boobs     delta(boobs)
2013-01-01     32        
2013-01-02     33        1
2013-01-03     34        1
2013-01-04     35        1
2013-01-05     30        -5

Hope this helps,

K

mloven_splunk
Splunk Employee
Splunk Employee

heh... boobs...

0 Karma

yannK
Splunk Employee
Splunk Employee

interesting tags.

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 ...