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 as Code: From Zero to Dashboard

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

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...