Splunk Search

help on where clause

jip31
Motivator

hi

why my where condition doesnt works please?

 

`boot` 
| fields host Name Path DegradationTime 
| stats max(DegradationTime) as DegradationTime by Path 
| where DegradationTime>1
| eval "DegradationTime" = round(('DegradationTime' / 1000),0) 

 

Labels (1)
Tags (1)
0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust
Yes..
I tried this..

| makeresults
| eval DegradationTime="100000" ,Path="C:"
| stats max(DegradationTime) as "DegradationTime" by Path
| eval "DegradationTime" = round(('DegradationTime' / 1000),0)
| where DegradationTime>1
| rename DegradationTime as "Degradation time (seconds)"

View solution in original post

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@jip31 

Can you please share sample OP from this? 

| fields host Name Path DegradationTime 
| stats max(DegradationTime) as DegradationTime by Path 
0 Karma

jip31
Motivator
Tags (1)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust
It looks you rename DegradationTime field.. Did you tried where condition before rename?? It's working for me.
0 Karma

jip31
Motivator

I dont understand

something like this??

 

| stats  max(DegradationTime) as "DegradationTime" by Path 
| eval "DegradationTime" = round(('DegradationTime' / 1000),0) 
| where DegradationTime>1 
| rename DegradationTime as "Degradation time (seconds)" 
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust
Yes..
I tried this..

| makeresults
| eval DegradationTime="100000" ,Path="C:"
| stats max(DegradationTime) as "DegradationTime" by Path
| eval "DegradationTime" = round(('DegradationTime' / 1000),0)
| where DegradationTime>1
| rename DegradationTime as "Degradation time (seconds)"
0 Karma

jip31
Motivator

yes it works now thanks

0 Karma
Get Updates on the Splunk Community!

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 ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...