Splunk Search

How do I move results retrieved by the "delta" command one row up?

j_r
Path Finder

Is it possible to move the results of "delta" one row up?

I calculate time difference with "delta" and would like to move the column with the results one row up

0 Karma
1 Solution

whrg
Motivator

Hello @j_r,

I could find a similar question here: How do I store the delta value in the previous row.

So the idea is to reverse the sort order, then calculate the delta, then reverse the sign and then reverse again:

your base search
| reverse | delta yourfield as yourfield_diff | eval yourfield_diff=0-yourfield_diff | reverse

Instead of "reverse" you could also use "sort _time" and "sort -_time".

View solution in original post

0 Karma

whrg
Motivator

Hello @j_r,

I could find a similar question here: How do I store the delta value in the previous row.

So the idea is to reverse the sort order, then calculate the delta, then reverse the sign and then reverse again:

your base search
| reverse | delta yourfield as yourfield_diff | eval yourfield_diff=0-yourfield_diff | reverse

Instead of "reverse" you could also use "sort _time" and "sort -_time".

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

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