Splunk Search

How to create a static column in a table?

shayhibah
Path Finder

I would like to create one column with labels that should not be changed.

For example:

column title: my_own
first row value: A
second row value: B
third row value:C

Is it possible to do it?

0 Karma
1 Solution

niketn
Legend

@shayhibah please add more details for your table. Does it always have static values?

If you just need a static column my_own with three static values A, B and C try the following run anywhere search:

| makeresults
| fields - _time
| eval my_own="A,B,C"
| makemv my_own delim=","
| mvexpand my_own
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

niketn
Legend

@shayhibah please add more details for your table. Does it always have static values?

If you just need a static column my_own with three static values A, B and C try the following run anywhere search:

| makeresults
| fields - _time
| eval my_own="A,B,C"
| makemv my_own delim=","
| mvexpand my_own
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

shayhibah
Path Finder

Thank you Niket, exactly what I need

niketn
Legend

@shayhibah I have converted my comment to Answer. Please accept to mark the question as answered!

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...