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!

Combine Multiline Logs into a Single Event with SOCK - a Guide for Advanced Users

This article is the continuation of the “Combine multiline logs into a single event with SOCK - a step-by-step ...

Everything Community at .conf24!

You may have seen mention of the .conf Community Zone 'round these parts and found yourself wondering what ...

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...