Splunk Search

Why am I not seeing any values for fields created with the eval command in my search?

xvxt006
Contributor

I have this search, but I am not seeing any values for Requests:

(status=200 OR status>399) | eval Type=if(status==200,"Good","Bad")  | chart count as requests  over host by Type | rename "requests: Good" as GoodRequests ,"requests: Bad" as Failures   | eval TotalRequests= (GoodRequests+Failures) | eval GoodRequestsPerc = round((GoodRequests/TotalRequests)*100,2) |   eval FailuresPerc = round((Failures/TotalRequests)*100,2)  | table host, GoodRequests,Failures,GoodRequestsPerc,  FailuresPerc | sort  -"FailuresPerc"

I am not seeing any values for GoodRequests, Failures, etc.

Any suggestions?

Tags (2)
0 Karma
1 Solution

xvxt006
Contributor

when i renamed, If i used the same name as i have in the if condition (instead of GoodRequests, used Good& requests: Bad as Bad) i am able to see the stats.

View solution in original post

0 Karma

xvxt006
Contributor

when i renamed, If i used the same name as i have in the if condition (instead of GoodRequests, used Good& requests: Bad as Bad) i am able to see the stats.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

If this answered your own question then please mark it as accepted.

If not then please explain your question.

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...