Splunk Search

Get current date in splunk text area

architkhanna
Path Finder

Hi All,

I am looking for a dashboard panel, where user can enter their comments in one column by typing themselves and in second column current date should come automatically. On click of submit , these value must save and shown to the user  as well.( may be via lookup ? )

Your help is appreciated .TIA

Labels (5)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @architkhanna,

you have tywo ways to do this:

  • using Lookup editor app, you can modify a lookup but you haven't automatic date field and you have to add it manually;
  • using a JavaScript, but it isn't so easy to describe!

In few words, you have to:

  • create a KV Store containing the fields you need (e.g. date and comment),
  • create a dashboard to show the values of the lookup, containing a button;
  • create a javaScript that, whwn clicked, runs a search that updates the KVStore.

We did it in my company and you can find in Community some help to create this javascript:

https://community.splunk.com/t5/Dashboards-Visualizations/Button-to-run-splunk-query/m-p/454738

https://community.splunk.com/t5/Dashboards-Visualizations/xml-code-to-add-custom-button-in-dashboard...

and others.

And to manage KV Store

https://dev.splunk.com/enterprise/docs/developapps/manageknowledge/kvstore/aboutkvstorecollections/

Ciao.

Giuseppe

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