<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic KVStore on remote server in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/KVStore-on-remote-server/m-p/405389#M26563</link>
    <description>&lt;P&gt;So this is bugging me.  I've got the following script in an HTML form in Splunk:&lt;/P&gt;

&lt;P&gt;//&lt;BR /&gt;
            // Get the collection of indexes&lt;BR /&gt;
            var myindexes = service.indexes();&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        // Get an index to send events to
        myindexes.fetch(function(err, myindexes) {
          var myindex = myindexes.item("main");

          // Submit an event to the index
          myindex.submitEvent("Case Opened - lit", {
              sourcetype: "notes"
          }, function(err, result, myindex) {
            console.log("Submitted event: ", result);
          });
        });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;//&lt;/P&gt;

&lt;P&gt;Which works.   But, if I add a line to use a variable instead of a literal string such as:&lt;/P&gt;

&lt;P&gt;//&lt;BR /&gt;
            // Get the collection of indexes&lt;BR /&gt;
            var myindexes = service.indexes();&lt;BR /&gt;
            var event = "Date=" + form_Date + ", BacklogID=" + form_BacklogID + ", evtID=" + form_evtID + ", Comments=" + form_Comments + ", Author=" + form_Author;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        // Get an index to send events to
        myindexes.fetch(function(err, myindexes) {
          var myindex = myindexes.item("main");

          // Submit an event to the index
          myindex.submitEvent(event, {
              sourcetype: "siem:alarm:notes"
          }, function(err, result, myindex) {
            console.log("Submitted event: ", result);
          });
        });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;//&lt;/P&gt;

&lt;P&gt;it doesn't give an error, but it doesn't add the record either.  I've debugged and stepped into the code and the var event does have data, but nothing gets pushed to the index.&lt;/P&gt;

&lt;P&gt;What gives?  Anybody have an idea?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:04:40 GMT</pubDate>
    <dc:creator>dokaas_2</dc:creator>
    <dc:date>2020-09-30T00:04:40Z</dc:date>
    <item>
      <title>KVStore on remote server</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/KVStore-on-remote-server/m-p/405389#M26563</link>
      <description>&lt;P&gt;So this is bugging me.  I've got the following script in an HTML form in Splunk:&lt;/P&gt;

&lt;P&gt;//&lt;BR /&gt;
            // Get the collection of indexes&lt;BR /&gt;
            var myindexes = service.indexes();&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        // Get an index to send events to
        myindexes.fetch(function(err, myindexes) {
          var myindex = myindexes.item("main");

          // Submit an event to the index
          myindex.submitEvent("Case Opened - lit", {
              sourcetype: "notes"
          }, function(err, result, myindex) {
            console.log("Submitted event: ", result);
          });
        });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;//&lt;/P&gt;

&lt;P&gt;Which works.   But, if I add a line to use a variable instead of a literal string such as:&lt;/P&gt;

&lt;P&gt;//&lt;BR /&gt;
            // Get the collection of indexes&lt;BR /&gt;
            var myindexes = service.indexes();&lt;BR /&gt;
            var event = "Date=" + form_Date + ", BacklogID=" + form_BacklogID + ", evtID=" + form_evtID + ", Comments=" + form_Comments + ", Author=" + form_Author;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        // Get an index to send events to
        myindexes.fetch(function(err, myindexes) {
          var myindex = myindexes.item("main");

          // Submit an event to the index
          myindex.submitEvent(event, {
              sourcetype: "siem:alarm:notes"
          }, function(err, result, myindex) {
            console.log("Submitted event: ", result);
          });
        });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;//&lt;/P&gt;

&lt;P&gt;it doesn't give an error, but it doesn't add the record either.  I've debugged and stepped into the code and the var event does have data, but nothing gets pushed to the index.&lt;/P&gt;

&lt;P&gt;What gives?  Anybody have an idea?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:04:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/KVStore-on-remote-server/m-p/405389#M26563</guid>
      <dc:creator>dokaas_2</dc:creator>
      <dc:date>2020-09-30T00:04:40Z</dc:date>
    </item>
  </channel>
</rss>

