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!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...