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!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...