Splunk Search

How to add a search bar in a column of a table in splunk dashboard?

niks987
Explorer

Hi All,

Hope you are doing well.

I created a table with a stats command which gives me a the avg of cpu and memory usage for different store number.
There are more than 900 store number so i was thinking of a way to add a search bar in column Store Number.

Please let me know if there are any way to do the same.

Thanks in advance

Tags (1)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust
0 Karma

DavidHourani
Super Champion

this is the old way of including JS, it way easier now to build a custom viz 😄

0 Karma

niketn
Legend

@DavidHourani I dont think that "SimpleXML JS Extension with SplunkJS to add custom table cell render" is old way of doing it "yet". Unless you are talking about the "React" way of doing this through "Splunk Developer Cloud" introduced as Splunk Next Beta program during Splunk .Conf last year.

"Custom Visualization API" would be an option if only text box based filter needs to be introduced as table cells. However, no other existing feature of Splunk's built in table visualization is required. If other features like formatting, drilldown, sorting, alignment, wrapping, pagination and SimpleXML configuration etc are required, then it will become a lot of "reinventing the wheel" kind of work using Custom Visualization.

https://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#table

However, coming back to current use case seems like, requirement is to have text box for filtering results. This could be done by adopting above answer with Simple XML JS Extension and creating first row of text-boxes.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

DavidHourani
Super Champion

100 % agreed ! 🙂

0 Karma

DavidHourani
Super Champion

Hi @niks987,

What you're looking for is a text input. Here's the documentation on how to implement that:
https://docs.splunk.com/Documentation/Splunk/7.2.6/Viz/FormEditor#Text_input
Once you add it to the top of the page you can then drag it to your table so it becomes attached to it.

Let me know if you need more help implementing it, you should be able to build everything with the GUI.

Cheers,
David

0 Karma

niks987
Explorer

Hi David,

Thanks for your reply.

I thought of using text input, but it wont be included withing the column. It will be part of table.

Do you know any other way to implement in the column itself.

Thanks in advance

0 Karma

DavidHourani
Super Champion

Using Splunk GUI no, you can build your own visualization that includes a tables with column filter. It's gotten easier to build than a few years ago, so you can give it a shot, here's the guide :
https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/CustomVizTutorial

0 Karma

DavidHourani
Super Champion

you can find a very simple JS example here with a filter :
https://www.w3schools.com/howto/howto_js_filter_table.asp
Still the filter is no in the column 😞

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@niks987

Can you please share the main requirement from where you thought about to add a search bar in the column??

0 Karma

niks987
Explorer

Hi Kamlesh,

Thanks for your reply.

A column A will contains more than 900 values which is difficult to scroll so to search directly would be very helpful. That is why i was looking for a where were i can add a search bar in the column.

Thanks

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 ...