Splunk Dev

is it possible to store the value into index which is given by user in textbox?

vengat4043
Path Finder

Dear team,

Can you please help me on the below query:

We have a textbox in the Dashboard, whatever the value is given to the textbox that need to be stored in index.

is it possible in splunk?

Labels (1)
0 Karma

aasabatini
Motivator

Hi @vengat4043 

I try to help, but maybe I don't understand the point.

anyway the splunk command to collect search results on a index is: "collect"

https://docs.splunk.com/Documentation/Splunk/8.1.3/SearchReference/Collect

now I built a dashboard with your request, a textbox and a panel with a collect comand to add the results on one index

<form>
  <label>test dashboard</label>
  <fieldset submitButton="true">
    <input type="text" token="field1">
      <label>textbox</label>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <title>fieldbox</title>
        <search>
          <query>* | eval fieldbox="$field1$" | table fieldbox _time | head 1 | collect index="name of index"</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </table>
    </panel>
  </row>
</form>

 

please, remember to change the name of index on the search present in Dashboard

I hope this can help

“The answer is out there, Neo, and it’s looking for you, and it will find you if you want it to.”
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...