<?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 Re: Errors everywhere / splunk.js SDK in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Errors-everywhere-splunk-js-SDK/m-p/199027#M57617</link>
    <description>&lt;P&gt;Firstly: What version Splunk?&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2014 17:32:41 GMT</pubDate>
    <dc:creator>alacercogitatus</dc:creator>
    <dc:date>2014-01-09T17:32:41Z</dc:date>
    <item>
      <title>Errors everywhere / splunk.js SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Errors-everywhere-splunk-js-SDK/m-p/199026#M57616</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;i am trying to start a search with the splunk-js-sdk and some own js-code. i've got several issues by programming this. i have no idea what's wrong and i have read every tutorial or documentation but it seems that nothing really match to my problems. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Dashboard-XML Code:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;.dashboard stylesheet="splunk-mva.css" script="splunk.js, splunk-mva.js, jquery-1.7.2.js".&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;splunk-mva.js is my own libary for the searchcalls.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;splunk-mva.js Code:&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;var http = new splunkjs.ProxyHttp("..");&lt;/CODE&gt; &amp;lt;--- Param&lt;CODE&gt;"/proxy"&lt;/CODE&gt; doenst work for me and why do i need http-instance? i am inside splunk.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;var splunkService = new splunkjs.Service(http, {sessionKey: document.cookie});&lt;/CODE&gt; &amp;lt;-- &lt;CODE&gt;user:/password:&lt;/CODE&gt; doesn't work either   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;var queryString = "select * from bild b join shopposition s on b.bildnummer=s.bildnummer\n join shoppositionartikelgruppe spag on s.datensatznummer=spag.shopposinummer\n join artikelnummer artnr on artnr.artikelgruppennummer=spag.artikelgruppennummer\n where artnr.artikelnummer='92956795'";

var searchParams = { output__mode: "JSON", exec___mode: "normal", id: "mvaJob" };
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;I tried two search-methods, both don't work for me:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;first&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunkService.oneshotSearch(queryString, searchParams,  function(err, results) {code}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;second&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunkService.search(queryString, searchParams, function(err, job) {code}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;------------------------------------------------ HTTP-HEADERS-FROM REQUEST -----------------------------------------&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Request URL:&lt;/STRONG&gt;....../de-DE/app/services/search/jobs?output_mode=json&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Request Method:&lt;/STRONG&gt;POST&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Status Code:&lt;/STRONG&gt;200 OK&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Request Headersview source&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Accept:&lt;/STRONG&gt;text/javascript, text/html, application/xml, text/xml, &lt;EM&gt;/&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Accept-Encoding:&lt;/STRONG&gt;gzip,deflate,sdch&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Accept-Language:&lt;/STRONG&gt;de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Authorization:&lt;/STRONG&gt;.......token.....&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Connection:&lt;/STRONG&gt;keep-alive&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Content-Length:&lt;/STRONG&gt;374&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Content-Type:&lt;/STRONG&gt;application/x-www-form-urlencoded&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Cookie:&lt;/STRONG&gt;..............session_id............. ; ......splunkweb_csrf_token.....&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Host:&lt;/STRONG&gt; ...........de &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Origin:&lt;/STRONG&gt;.................de&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;http:&lt;/STRONG&gt;.................de&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Referer:&lt;/STRONG&gt;http:............../de-DE/app/analytics/test13&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;User-Agent:&lt;/STRONG&gt;Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 &lt;/P&gt;

&lt;P&gt;Safari/537.36&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;X-ProxyDestination:&lt;/STRONG&gt;localhost:8089/services/search/jobs?output_mode=json&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;X-Requested-With:&lt;/STRONG&gt;XMLHttpRequest&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;X-Splunk-Form-Key:&lt;/STRONG&gt;6737785215983761462&lt;/P&gt;

&lt;P&gt;Q*&lt;EM&gt;uery String Parametersview sourceview URL encoded&lt;/EM&gt;*&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;output_mode:&lt;/STRONG&gt;json&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Form Dataview sourceview URL encoded&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;output_mode:&lt;/STRONG&gt;JSON&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;exec_mode:&lt;/STRONG&gt;normal&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;id:&lt;/STRONG&gt;mvaJob&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;search:&lt;/STRONG&gt;select * from bild b join shopposition s on b.bildnummer=s.bildnummer&lt;BR /&gt;
 join shoppositionartikelgruppe spag on s.datensatznummer=spag.shopposinummer&lt;BR /&gt;
 join artikelnummer artnr on artnr.artikelgruppennummer=spag.artikelgruppennummer&lt;BR /&gt;
 where artnr.artikelnummer='92956795'&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Response Headersview source&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Connection:&lt;/STRONG&gt;close&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Content-Length:&lt;/STRONG&gt;478&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Content-Type:&lt;/STRONG&gt;text/json;charset=utf-8&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Date:&lt;/STRONG&gt;Thu, 09 Jan 2014 15:02:49 GMT&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Server:&lt;/STRONG&gt;CherryPy/3.1.2&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Set-Cookie:&lt;/STRONG&gt;session_id..........................; expires=Fri, 10 Jan 2014 15:02:49 GMT; httponly; Path=/&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Set-Cookie:&lt;/STRONG&gt;splunkweb_csrf_token.................. ; expires=Tue, 08 Jan 2019 15:02:49 GMT; Path=/&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;RESPONSE&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;{"total": 0, "data": null, "count": 0,&lt;BR /&gt;
"success": false, "offset": 0,&lt;BR /&gt;
"messages": [{"message":&lt;BR /&gt;
"Ung\u00fcltiger*&lt;EM&gt;(Invalid)&lt;/EM&gt;*&lt;BR /&gt;
Viewstate-Parametername: search;&lt;BR /&gt;
Vorgang wird abgebrochen*&lt;EM&gt;(operation&lt;BR /&gt;
is aborting)&lt;/EM&gt;*", "type": "ERROR",&lt;BR /&gt;
"time": "2014-01-09T16:02:49"}]}&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Any idea?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:37:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Errors-everywhere-splunk-js-SDK/m-p/199026#M57616</guid>
      <dc:creator>gaRe</dc:creator>
      <dc:date>2020-09-28T15:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Errors everywhere / splunk.js SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Errors-everywhere-splunk-js-SDK/m-p/199027#M57617</link>
      <description>&lt;P&gt;Firstly: What version Splunk?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2014 17:32:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Errors-everywhere-splunk-js-SDK/m-p/199027#M57617</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2014-01-09T17:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Errors everywhere / splunk.js SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Errors-everywhere-splunk-js-SDK/m-p/199028#M57618</link>
      <description>&lt;P&gt;If you are inside splunk itself, you might as well use the SplunkJS instead of the SDK.&lt;BR /&gt;
&lt;A href="http://dev.splunk.com/view/webframework-splunkjsstack/SP-CAAAESV"&gt;http://dev.splunk.com/view/webframework-splunkjsstack/SP-CAAAESV&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2014 18:01:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Errors-everywhere-splunk-js-SDK/m-p/199028#M57618</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-01-09T18:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Errors everywhere / splunk.js SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Errors-everywhere-splunk-js-SDK/m-p/199029#M57619</link>
      <description>&lt;P&gt;It's 6.0.1&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 08:05:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Errors-everywhere-splunk-js-SDK/m-p/199029#M57619</guid>
      <dc:creator>gaRe</dc:creator>
      <dc:date>2014-01-10T08:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Errors everywhere / splunk.js SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Errors-everywhere-splunk-js-SDK/m-p/199030#M57620</link>
      <description>&lt;P&gt;Thank you very much. You deserve a beer!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 08:50:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Errors-everywhere-splunk-js-SDK/m-p/199030#M57620</guid>
      <dc:creator>gaRe</dc:creator>
      <dc:date>2014-01-10T08:50:04Z</dc:date>
    </item>
  </channel>
</rss>

