All Apps and Add-ons
Highlighted

Is there any way to store data of text input panel into database?

Path Finder

Hi Everyone,

I have requirement to add multiple text-boxes in Splunk dashboard. User will be able to enter data into text boxes. After that once user click on submit button the data should get store under a database table.

Example:-

EmpID Name Dept
1 Nikks -----
2 Neel ----

Text Box (Dept) :- Enter the department name for the selected Employee.

Once user will click on the particular EmpID for whom he wants to add department name. Then he will enter the department name in the text box.

After entering, if user clicks on submit button then data should get updated under a particular table of database.

Please suggest, Is it possible in splunk?
If yes, then help me to implement the same.

Thanks in Advance.
Nikks

0 Karma
Highlighted

Re: Is there any way to store data of text input panel into database?

Legend

@nilaksh92, your scenario seems to be a use case for KV Store.

1. Implement using KV Store
Please check out the following tutorial to create your own form to use KV Store: http://dev.splunk.com/view/webframework-tutorials/SP-CAAAEZT

If you really need to push data Database you can consider following two options:
2 a) Splunk DB Connect App: Configure DB Connect app to connect to your database and use dbxoutput command to write back to Database using DB Output configured in DB Connect App. Refer to documentation: http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Createandmanagedatabaseoutputs#Use_dbxoutp...

2 b) Scripted input to Database: Reverse engineer the example on Scripted input to poll Database using Python to write back to your database. You would need to JavaScript to execute the script. This way you can control writing back to DB as per your use case. However, security and robustness of this depends strictly on the scripts implemented (both front-end and back-end). http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ScriptExample




| eval message="Happy Splunking!!!"


0 Karma
Highlighted

Re: Is there any way to store data of text input panel into database?

Legend

@nilaksh92, I have converted to answer. Please accept to mark as answered. Also consider suggestion by @DalJeanis and upvote. Do ask us any further clarification with the details you have.




| eval message="Happy Splunking!!!"


0 Karma
Highlighted

Re: Is there any way to store data of text input panel into database?

SplunkTrust
SplunkTrust

@milaksh92 - @niketnilay has given you a pretty good list of your options in Splunk. I would add that you should review whichever database you are using (since you are referring to "tables") and see what the most direct option for formed input to that database is.

Feeding the data through Splunk is not necessarily the best option, and should only be the choice for architecture if an important subset of the source data is already present in Splunk, thus making it the natural place to make the remainder of the data entry happen.