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!

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...