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 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...