<?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: How to see if a search module is working, how to debug ? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88318#M5802</link>
    <description>&lt;P&gt;I'm the owner of DB Connect. Try turning on debug logging (&lt;A href="http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/javaspec"&gt;http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/javaspec&lt;/A&gt;) and see what SQL actually gets executed on drilldown.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Apr 2013 17:43:42 GMT</pubDate>
    <dc:creator>Dan</dc:creator>
    <dc:date>2013-04-22T17:43:42Z</dc:date>
    <item>
      <title>How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88308#M5792</link>
      <description>&lt;P&gt;I've a search module as child of a table for drilldown.&lt;BR /&gt;
The table that should display the result ist empty... Is there a way to display the search string from the nested search somehow ?&lt;/P&gt;

&lt;P&gt;I was not able the module that is used by Splunk-Search for "View results" in Sideview ?&lt;/P&gt;

&lt;P&gt;Here is the debug output of the table element after the search is run, and before I click a row:&lt;BR /&gt;
    Debug Module : Table_0_5_0&lt;BR /&gt;
    Search values added/modified for downstream modules&lt;BR /&gt;
    (none)&lt;BR /&gt;
    Normal keys added/modified for downstream modules&lt;BR /&gt;
    (none)&lt;BR /&gt;
    Search values inherited from upstream&lt;BR /&gt;
    search  | dbquery "test" "SELECT SOMETHING"&lt;BR /&gt;
    timerange   over all time&lt;BR /&gt;
    search id   1365677693.860&lt;BR /&gt;
    Normal keys inherited from upstream&lt;BR /&gt;
    bpuic.element   [object Object]&lt;BR /&gt;
    bpuic.rawValue  8503130&lt;BR /&gt;
    bpuic.value 8503130&lt;BR /&gt;
    bpuic   8503130&lt;/P&gt;

&lt;P&gt;Debug output from the search under the table:&lt;BR /&gt;
    Debug Module : Search_1_6_0&lt;BR /&gt;
    Search values added/modified for downstream modules&lt;BR /&gt;
    search  index=t_cus | head 1&lt;BR /&gt;
    Normal keys added/modified for downstream modules&lt;BR /&gt;
    (none)&lt;BR /&gt;
    Search values inherited from upstream&lt;BR /&gt;
    search  | dbquery "kivdv_test" "SELECT TO_CHAR(l.ROW_ERF_TSTAMP,'YYYY-MM-DD HH24:mm:SS-FF'),BETRIEBSTAG,k.fahrt_bezeichner,k.vmnummer,k.start_bpuic,k.end_bpuic,l.* FROM KIVDV_PRODPLAN.VM_VDV k JOIN KIVDV_PRODPLAN.VM_FAHRT_PUNKT_VDV l ON k.ID=l.VM_VDV_ID WHERE BPUIC=8503130"&lt;BR /&gt;
    timerange   over all time&lt;BR /&gt;
    Normal keys inherited from upstream&lt;BR /&gt;
    bpuic.element   [object Object]&lt;BR /&gt;
    bpuic.rawValue  8503130&lt;BR /&gt;
    bpuic.value 8503130&lt;BR /&gt;
    bpuic   8503130&lt;/P&gt;

&lt;P&gt;Code from the entire view:&lt;BR /&gt;
    &lt;VIEW issticky="False" isvisible="true" onunloadcanceljobs="true" template="dashboard.html"&gt;&lt;BR /&gt;
      &lt;LABEL&gt;VDV Datenbank Abfrage&lt;/LABEL&gt;&lt;/VIEW&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;module name="AccountBar" layoutPanel="appHeader" /&amp;gt;

  &amp;lt;module name="AppBar" layoutPanel="appHeader" /&amp;gt;

  &amp;lt;module name="SideviewUtils" layoutPanel="appHeader" /&amp;gt;

  &amp;lt;module name="Message" layoutPanel="messaging"&amp;gt;
    &amp;lt;param name="filter"&amp;gt;*&amp;lt;/param&amp;gt;
    &amp;lt;param name="maxSize"&amp;gt;2&amp;lt;/param&amp;gt;
    &amp;lt;param name="clearOnJobDispatch"&amp;gt;False&amp;lt;/param&amp;gt;
  &amp;lt;/module&amp;gt;

  &amp;lt;module name="HTML" layoutPanel="viewHeader"&amp;gt;
    &amp;lt;param name="html"&amp;gt;&amp;lt;![CDATA[
        &amp;lt;h1&amp;gt;VDV Datenbank Suche&amp;lt;/h1&amp;gt;

]]&amp;gt;&amp;lt;/param&amp;gt;

    &amp;lt;module name="TextField" layoutPanel="mainSearchControls"&amp;gt;
      &amp;lt;param name="default"&amp;gt;8503130&amp;lt;/param&amp;gt;
      &amp;lt;param name="label"&amp;gt;BPUIC&amp;lt;/param&amp;gt;
      &amp;lt;param name="name"&amp;gt;bpuic&amp;lt;/param&amp;gt;

      &amp;lt;module name="TimeRangePicker"&amp;gt;
        &amp;lt;param name="searchWhenChanged"&amp;gt;False&amp;lt;/param&amp;gt;

        &amp;lt;module name="Button"&amp;gt;
          &amp;lt;param name="label"&amp;gt;Search&amp;lt;/param&amp;gt;

          &amp;lt;module name="Search"&amp;gt;
            &amp;lt;param name="search"&amp;gt;&amp;lt;![CDATA[
| dbquery "kivdv_test"
"SELECT TO_CHAR(l.ROW_ERF_TSTAMP,'YYYY-MM-DD HH24:mm:SS-FF'),BETRIEBSTAG,k.fahrt_bezeichner,k.vmnummer,k.start_bpuic,k.end_bpuic,l.*  FROM KIVDV_PRODPLAN.VM_VDV k JOIN KIVDV_PRODPLAN.VM_FAHRT_PUNKT_VDV l ON k.ID=l.VM_VDV_ID WHERE BPUIC=$bpuic$"




]]&amp;gt;&amp;lt;/param&amp;gt;

            &amp;lt;module name="Table"&amp;gt;

              &amp;lt;module name="Search"&amp;gt;
                &amp;lt;param name="earliest"&amp;gt;0&amp;lt;/param&amp;gt;
                &amp;lt;param name="search"&amp;gt;&amp;lt;![CDATA[
index=t_cus | head 1










]]&amp;gt;&amp;lt;/param&amp;gt;

                &amp;lt;module name="Table" layoutPanel="panel_row1_col1" /&amp;gt;

                &amp;lt;module name="SimpleResultsTable" layoutPanel="panel_row1_col2" /&amp;gt;

                &amp;lt;module name="PostProcess"&amp;gt;
                  &amp;lt;param name="search"&amp;gt;
search AB_ERW=1365494922.000
&amp;lt;/param&amp;gt;

                  &amp;lt;module name="Table" layoutPanel="panel_row1_col1" /&amp;gt;
                &amp;lt;/module&amp;gt;

                &amp;lt;module name="JobStatus" /&amp;gt;

                &amp;lt;module name="HTML"&amp;gt;
                  &amp;lt;param name="html"&amp;gt;
&amp;amp;lt;h3&amp;amp;gt;DEBUGGING&amp;amp;lt;/h3&amp;amp;gt;
&amp;amp;lt;b&amp;amp;gt;search:&amp;amp;lt;/b&amp;amp;gt; $search$&amp;amp;lt;br&amp;amp;gt;
&amp;amp;lt;b&amp;amp;gt;postProcess:&amp;amp;lt;/b&amp;amp;gt; $postProcess$&amp;amp;lt;br&amp;amp;gt;
&amp;amp;lt;b&amp;amp;gt;username:&amp;amp;lt;/b&amp;amp;gt; $row.fields.username$&amp;amp;lt;br&amp;amp;gt;


&amp;lt;/param&amp;gt;
                &amp;lt;/module&amp;gt;
              &amp;lt;/module&amp;gt;

              &amp;lt;module name="HTML"&amp;gt;
                &amp;lt;param name="html"&amp;gt;&amp;lt;![CDATA[
&amp;lt;h3&amp;gt;DEBUGGING&amp;lt;/h3&amp;gt;
&amp;lt;b&amp;gt;search:&amp;lt;/b&amp;gt; $search$&amp;lt;br&amp;gt;
&amp;lt;b&amp;gt;postProcess:&amp;lt;/b&amp;gt; $postProcess$&amp;lt;br&amp;gt;
&amp;lt;b&amp;gt;username:&amp;lt;/b&amp;gt; $row.fields.username$&amp;lt;br&amp;gt;
$row.fields.VMNUMMER$&amp;lt;br&amp;gt;
$row.fields.VIA$
]]&amp;gt;&amp;lt;/param&amp;gt;
              &amp;lt;/module&amp;gt;
            &amp;lt;/module&amp;gt;
          &amp;lt;/module&amp;gt;
        &amp;lt;/module&amp;gt;
      &amp;lt;/module&amp;gt;
    &amp;lt;/module&amp;gt;
  &amp;lt;/module&amp;gt;
&amp;lt;/view&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:42:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88308#M5792</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2020-09-28T13:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88309#M5793</link>
      <description>&lt;P&gt;The easiest way is to just throw an HTML module in there and print out the $search$ token. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="HTML"&amp;gt;
  &amp;lt;param name="html"&amp;gt;&amp;lt;![CDATA[
    &amp;lt;h3&amp;gt;DEBUGGING&amp;lt;/h3&amp;gt;
    &amp;lt;b&amp;gt;search:&amp;lt;/b&amp;gt; $search$
  ]]&amp;gt;&amp;lt;/param&amp;gt;
&amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can also throw one of these beneath table or chart drilldown configs and this can be a great simple way to debug why things aren't working the way you expect. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="HTML"&amp;gt;
  &amp;lt;param name="html"&amp;gt;&amp;lt;![CDATA[
    &amp;lt;h3&amp;gt;DEBUGGING&amp;lt;/h3&amp;gt;
    &amp;lt;b&amp;gt;search:&amp;lt;/b&amp;gt; $search$&amp;lt;br&amp;gt;
    &amp;lt;b&amp;gt;postProcess:&amp;lt;/b&amp;gt; $postProcess$&amp;lt;br&amp;gt;
    &amp;lt;b&amp;gt;username:&amp;lt;/b&amp;gt; $row.fields.username$&amp;lt;br&amp;gt;
  ]]&amp;gt;&amp;lt;/param&amp;gt;
&amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However you can also use the "Runtime Debug" mode of the Sideview Editor, which is an extremely powerful tool, and which will show you &lt;EM&gt;all&lt;/EM&gt; of the keys passing downstream through any given point in the view.   Using an HTML module is better for tactical debugging, and at the most complex part of a view I frequently leave one their commented out (what's useful debugging today's problem will be used again tomorrow).   But the Runtime Debug can be useful to discover what other keys are there for you to use...   And remember to update Sideview Utils because there's a lot of documentation in there about what keys are there. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://sideviewapps.com/apps/sideview-utils"&gt;http://sideviewapps.com/apps/sideview-utils&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2013 23:05:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88309#M5793</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-04-09T23:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88310#M5794</link>
      <description>&lt;P&gt;I don't know if its a bug, but I none of the variable are set, after my table (the table is based on a dbquery-search) :&lt;/P&gt;

&lt;P&gt;I have :&lt;BR /&gt;
Search(dbquery)&lt;BR /&gt;
   |&lt;BR /&gt;
Table (displaying results)&lt;BR /&gt;
  |&lt;BR /&gt;
Html   (all variables empty)&lt;/P&gt;

&lt;P&gt;I have exact the same structure on a "normal search", and I get $row.fieds.*$ variables returned ?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2013 06:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88310#M5794</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2013-04-10T06:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88311#M5795</link>
      <description>&lt;P&gt;Can you check that you have the SideviewUtils module up at the top of the page?   If that's not there then you're page will have a Fatal Javascript error, although parts of it might work enough to make you think that the page is working.   Are you saying the $search$ variable itself is blank?   Pretty much only a fatal JS error could have done that.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2013 15:12:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88311#M5795</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-04-10T15:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88312#M5796</link>
      <description>&lt;P&gt;There is no JS error, html after search is displaying the $search$&lt;BR /&gt;
But on the html after the table, $row.fields.[fieldname] is not displaying anything... $search$ is also empty&lt;/P&gt;

&lt;P&gt;I've but the debug output of the table element in description. After clicking a row, I can't see the debug from the Table element... &lt;BR /&gt;
Elements under that table, haven't any key from the column of that table&lt;/P&gt;

&lt;P&gt;Is there a limitation by dbquery that data cannot be used in underlying elements ?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2013 10:52:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88312#M5796</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2013-04-11T10:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88313#M5797</link>
      <description>&lt;P&gt;And just to double check, when you're debugging it like this, it is always after you have clicked one of the Table rows to select it, right?  If there's no selected yellow row in the Table then the module will add no keys to the search, and actually that's pretty much the &lt;EM&gt;only&lt;/EM&gt; way that can happen (as in that Runtime Debug output you posted)&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2013 17:00:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88313#M5797</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-04-11T17:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88314#M5798</link>
      <description>&lt;P&gt;Yes one row is selected.&lt;BR /&gt;
I know it is pretty strange, thats why I'm wondering if it is not linked to the dbquery ?&lt;/P&gt;

&lt;P&gt;I'm using drilldown successfully on 10 other places without problem.&lt;/P&gt;

&lt;P&gt;I've posted, output from table, and search under the table, as well as the entire code.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2013 16:18:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88314#M5798</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2013-04-15T16:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88315#M5799</link>
      <description>&lt;P&gt;Well, once you have eliminated the impossible...  I'll check out DB Connect to see if maybe search results returned from its searches have some odd characteristics, that somehow dont trigger JS errors, but do disrupt the drilldown functionality.  I'll let you know.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 18:21:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88315#M5799</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-04-16T18:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88316#M5800</link>
      <description>&lt;P&gt;Hi nick, I've changed the select for simple one, and after that it works... (maybe problem because of the TO_CHAR ?)&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2013 09:03:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88316#M5800</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2013-04-19T09:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88317#M5801</link>
      <description>&lt;P&gt;Oh that might make sense.   If that is able to change the API output such that some characters are actually in the wrong &lt;EM&gt;encoding&lt;/EM&gt;,  yea I can imagine things could quietly fail with no error message logged. I'm still working on getting DB Connect set up locally to test, but I'll try and confirm when I do and I'll ping the owner of DB Connect to let him know the hypothesis.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2013 16:38:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88317#M5801</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-04-19T16:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88318#M5802</link>
      <description>&lt;P&gt;I'm the owner of DB Connect. Try turning on debug logging (&lt;A href="http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/javaspec"&gt;http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/javaspec&lt;/A&gt;) and see what SQL actually gets executed on drilldown.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2013 17:43:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88318#M5802</guid>
      <dc:creator>Dan</dc:creator>
      <dc:date>2013-04-22T17:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to see if a search module is working, how to debug ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88319#M5803</link>
      <description>&lt;P&gt;As a sanity check, can you confirm that you intend the drilldown search to &lt;EM&gt;not&lt;/EM&gt; involve any values or anything at all from the dbconnect search?   The drilldown search here will search for &lt;CODE&gt;index=t_cus | head 1&lt;/CODE&gt;,  over the timerange specified by the TimeRangePicker.   If that returns zero results, then the drilldown table will never show any results.    I have been assuming that your &lt;CODE&gt;index=t_cus | head 1&lt;/CODE&gt;  search is itself a test-search, and that you know that there's at least one event from the t_cus index within the timerange selected by the TimeRangePicker, but i'm just checking.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2013 18:36:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-see-if-a-search-module-is-working-how-to-debug/m-p/88319#M5803</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-04-22T18:36:27Z</dc:date>
    </item>
  </channel>
</rss>

