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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...