Splunk Search

Create an Own column in my query

exchanger
Path Finder

Hello,

I have a query (e.g. "....... " | stats count, avg(...)) and after that I get as result
Count avg
20        40

What I would like to have before that is a separate column that I can name myself.
So desired:
OwnColumn Count AVG
XYZ                 20           40

How can I include this in my query?

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| stats count as Count, avg(DURATION)) as AVG
| eval OwnColumn="XYZ"
| fields OwnColumn, Count, AVG

View solution in original post

exchanger
Path Finder

thank you very much

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| stats count as Count, avg(DURATION)) as AVG
| eval OwnColumn="XYZ"
| fields OwnColumn, Count, AVG
Get Updates on the Splunk Community!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...