Splunk Cloud Platform

getting results based on conditions

shari
Engager

hi,

i need to build a query that fetches me results based on a condition, 

index=<myindex>  host=<myhost>  |rex field=_raw ".*TimeInMs=(?<TimeInMs>\d+)" | table host,  TimeInMs

here in my case, i need only those host values where TimeInMs is greater than 120000.

Appreciate your help in correct query for the same.

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
index=<myindex>  host=<myhost>  
|rex field=_raw ".*TimeInMs=(?<TimeInMs>\d+)" 
| where TimeInMs > 120000
| table host,  TimeInMs

You may need to convert TimeInMs to a number

| eval TimeInMs=tonumber(TimeInMs)

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
index=<myindex>  host=<myhost>  
|rex field=_raw ".*TimeInMs=(?<TimeInMs>\d+)" 
| where TimeInMs > 120000
| table host,  TimeInMs

You may need to convert TimeInMs to a number

| eval TimeInMs=tonumber(TimeInMs)
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...