Splunk Search

passing table column value as new column header

dgadjov
Explorer

I'm trying to make a table that has one of the column headers to have the value as the most occurring value in another column. I want to do something similar to this:

..| rename columnX as [stats mode(columnY)]
Tags (1)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

In general you can do things like this:

| stats count | rename count as [stats count | return $count]

Note though, the subsearch does not use any info from the surrounding search, you will have to retrieve that from within the subsearch.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

In general you can do things like this:

| stats count | rename count as [stats count | return $count]

Note though, the subsearch does not use any info from the surrounding search, you will have to retrieve that from within the subsearch.

Get Updates on the Splunk Community!

Splunk Enterprise Security 8.0.2 Availability: On cloud and On-premise!

A few months ago, we released Splunk Enterprise Security 8.0 for our cloud customers. Today, we are excited to ...

Logs to Metrics

Logs and Metrics Logs are generally unstructured text or structured events emitted by applications and written ...

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...