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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...