Splunk Search

Different output in execution of same splunk query.

sarvesh_11
Communicator

Hello Splunkers,
I am writing a simple splunk query to append 2 lookup.
|inputlookup test1.csv
| inputlookup append=true test2.csv
| outputlookup test1.csv

When i execute this on search, it gives me the desired result. i.e it appends the test1.csv
But when i add this to my .js

require([
"jquery",
"splunkjs/mvc/searchmanager",
"splunkjs/mvc/simplexml/ready!"
], function(
$,
SearchManager
) {
var mysearch = new SearchManager({
id: "mysearch",
autostart: "false",
search: "|inputlookup test1.csv
|inputlookup append=true test2.csv
|outputlookup test1.csv
"
});
$(".button1").on("click", function (){
var ok = confirm("Are you sure?");
if (ok){
mysearch.startSearch();
alert('attempted restart!');
} //else {
// alert('user did not click ok!');
//}
});
});

On clicking the button, this overwrites the content of test1.csv, i.e it replaces the values in test1.csv

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...