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 Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...