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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...