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!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...