Splunk Search

How do i compare the field values in my search?

guna1390
New Member

I have a field here like total_time which has 100+ values (0.125,2.25,etc).

I want the result like the field total_time values which are greater than 10.

my search is search_command | eval responsetime=if(total_time>20, "Yes", "No")

BUT the above search is taken as a count and showing the results.

0 Karma
1 Solution

somesoni2
Revered Legend

Are you trying to filter to keep only the events/records for which the total_time value is greater than 10?? If yes, the try like this

search_command | where total_time>10

If not then probably more details here would help, like expected output.

View solution in original post

0 Karma

somesoni2
Revered Legend

Are you trying to filter to keep only the events/records for which the total_time value is greater than 10?? If yes, the try like this

search_command | where total_time>10

If not then probably more details here would help, like expected output.

0 Karma

guna1390
New Member

Thanks.

It works for me.

0 Karma
Get Updates on the Splunk Community!

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...