Splunk Search

Percentage not showing on Timechart correctly

luckyman80
Path Finder

Hi Splunk Experts,
I'm doing a calculation and adding to timechart like so

eval Thread4 = (avg4 * total_events * 100) / 300000000000
|timechart span=5m limit=0 max(Thread1), max(Thread2), max(Thread3), max(Thread4) by instance

When I look at what should be 38.87836045 when i look in timechart it shows as 3,887,836045. Its also set the Axis on the left side to 4.000 ... Any easy way to change this so its just * 100 ?

Thanks in advance

0 Karma

woodcock
Esteemed Legend

It is very unclear what you need but are you aware that there is an avg function that you can use in timechart, instead of max?

0 Karma

mayurr98
Super Champion

I did not understand what are you trying to say. can you put the entire search query in 101010 sample code. also let me know what is the o/p of eval command and what you are trying to achieve.

luckyman80
Path Finder
Identifier sourcetype="my-logs"  source="/var/tmp/myprocess"  | rex field=source "process(?.*?)_"
| rex "(?s)Evt:1.*\n.*identifier.*Avg:\s*(?\d+)ns;\s*Median:\s*(?\d+)ns;\s*Max:\s*(?\d+)ns;\s*Total Events:\s*(?\d+);\s*Total Items:\s*(?\d+)"| rex field=source "process(?.*?)_" |  eval Thread1 = (avg1 * total_events * 100) / 300000000000
|timechart span=5m limit=0 max(Thread1) by instance

like I say it comes out by instead of between 0 - 100 pct the axis show what I mentioned above

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...