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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...