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!

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