Splunk Search

Why is my search producing error "The eval expression has no fields: 'round(on/total*100)'"?

singhh4
Path Finder

Hey people,

I have a simple search I can't get to work. I've tried to look up solutions, but couldn't find anything that worked for me.

index="servers"
|timechart count(eval(status="On")) as on count and total eval(round(on/total*100))

I keep getting this error: The eval expression has no fields: 'round(on/total*100)'

0 Karma
1 Solution

vasanthmss
Motivator

try this,

index=servers |timechart count(eval(sourcetype="splunkd")) as on , count as total | eval percent=(round(on/total*100))
V

View solution in original post

vasanthmss
Motivator

try this,

index=servers |timechart count(eval(sourcetype="splunkd")) as on , count as total | eval percent=(round(on/total*100))
V

singhh4
Path Finder

Thank you!

0 Karma
Get Updates on the Splunk Community!

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

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