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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...