Dashboards & Visualizations

How to create events per dashboard inputs and save it to index XY afterwards

BMacher
Path Finder

Hello, I want to create a dashboard on which I can create events per inputs (fields like project, action, from, to) and by clicking on a submit button it will be saved in a certain index. So far I found the "collect" command, but since I don´t get any search results and want to create a event from scratch, I can´t really use it.

Do you have any idea?

Thanks a lot and kind regards
Benjamin

0 Karma
1 Solution

somesoni2
Revered Legend

You can use the makeresults commands to generate dummy row (or gentimes) and then add fields based on your form input and use collect command to save them in index.

Example search (works on 6.3+ versions)

| makeresults | eval project="$projecttoken$" | eval action="$actiontoken$" ....
| collect ....

or (works on all versions)

| gentimes start=-1 | eval project="$projecttoken$" | table project  | eval action="$actiontoken$" ....
| collect ....

View solution in original post

0 Karma

woodcock
Esteemed Legend

Your request is highly unusual. It would help us to understand the full use-case, perhaps with examples a start-to-finish walk-though of one "creation".

0 Karma

somesoni2
Revered Legend

You can use the makeresults commands to generate dummy row (or gentimes) and then add fields based on your form input and use collect command to save them in index.

Example search (works on 6.3+ versions)

| makeresults | eval project="$projecttoken$" | eval action="$actiontoken$" ....
| collect ....

or (works on all versions)

| gentimes start=-1 | eval project="$projecttoken$" | table project  | eval action="$actiontoken$" ....
| collect ....
0 Karma

BMacher
Path Finder

Thank you, works great!

0 Karma
Get Updates on the Splunk Community!

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

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...