Splunk Search

Eval Question for Table

jhayIV
Engager

Using the table below I have the following query table Server_Name,Server_TotalPhysicalMemory,Server_Cores,Server_NumberofProcessors,Server_Domain,Server_IsVirtual,Server_LastScanDate,Server_SerialNumber,Server_Site,Associated_AppliationProductName,Associated_OperatingSystem,_time | stats count() | transpose
I would like to divide each value by count(Server_Name) is there a way to do that using the EVAL function?
alt text

Tags (1)
0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

Try something like this

table Server_Name,Server_TotalPhysicalMemory,Server_Cores, Server_NumberofProcessors, Server_Domain,Server_IsVirtual,Server_LastScanDate,Server_SerialNumber, Server_Site, Associated_AppliationProductName,Associated_OperatingSystem,_time | stats count(*) as count_*  | eval divider=count_Server_Name | untable divider column value | eval value=value/divider | fields - divider

View solution in original post

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Try something like this

table Server_Name,Server_TotalPhysicalMemory,Server_Cores, Server_NumberofProcessors, Server_Domain,Server_IsVirtual,Server_LastScanDate,Server_SerialNumber, Server_Site, Associated_AppliationProductName,Associated_OperatingSystem,_time | stats count(*) as count_*  | eval divider=count_Server_Name | untable divider column value | eval value=value/divider | fields - divider
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...