Splunk Search

How do I divide each value in this row by a value in one of the columns?

jhayIV
Engager

How would I divide each value in this row by the count(CMDB SERVER) calc?
alt text

Tags (3)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Assuming the columns are dynamic you'll want to use foreach:

... | rename "count(CMDB SERVER)" as cmdb | foreach count* [eval <<FIELD>> = '<<FIELD>>' / cmdb] | rename cmdb as "count(CMDB SERVER)"
0 Karma

jluo_splunk
Splunk Employee
Splunk Employee

You can use the eval command to create a new columns or modify the values of the current columns (documentation here: http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/eval)

Renaming your columns will make the eval strings a bit neater, for example..

... | rename "count(CMDB Server" as "CMDB_Server", "count(CMDB APP)" as "CMDB_App" | eval CMDB_App = CMDB_App/CMDB_Server

0 Karma
Get Updates on the Splunk Community!

Index This | When is October more than just the tenth month?

October 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...