<?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: Custom command  giving unexpected result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Custom-command-giving-unexpected-result/m-p/391889#M114086</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
2 things can be tested here a bit further :&lt;BR /&gt;
1-What happens if you run this command through CLI? something like &lt;CODE&gt;$ splunk search "| shape&lt;/CODE&gt;. What output do you receive?&lt;BR /&gt;
2- What happens if you run something like this from splunk web - &lt;CODE&gt;index="main"|sourcetype="tutorial"|shape&lt;/CODE&gt;&lt;BR /&gt;
3- you of course need to restart splunk enterprise after making the configuration changes&lt;/P&gt;</description>
    <pubDate>Sun, 17 Jun 2018 10:17:34 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2018-06-17T10:17:34Z</dc:date>
    <item>
      <title>Custom command  giving unexpected result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-command-giving-unexpected-result/m-p/391888#M114085</link>
      <description>&lt;P&gt;I have followed below link but not receiving expected result.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step 1&lt;/STRONG&gt;&lt;BR /&gt;
Commands.conf&lt;BR /&gt;
[shape]&lt;BR /&gt;
chunked=true&lt;BR /&gt;
filename = shape.py&lt;BR /&gt;
generating = true&lt;BR /&gt;
supports_rawargs = true&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step 2&lt;/STRONG&gt;&lt;BR /&gt;
authorize.conf&lt;BR /&gt;
[capability::run_script_first]&lt;BR /&gt;
[role_admin]&lt;BR /&gt;
run_script_first = enabled&lt;/P&gt;

&lt;P&gt;Step &lt;STRONG&gt;3&lt;/STRONG&gt;&lt;BR /&gt;
shape.py (in bin directory)&lt;BR /&gt;
shape.py from below location.&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.1/Search/Customsearchcommandshape" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.1/Search/Customsearchcommandshape&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step 4:&lt;/STRONG&gt;&lt;BR /&gt;
IImage attached&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/250951-result.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Step 5&lt;/STRONG&gt;&lt;BR /&gt;
expected result same as below link&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.1/Search/Customsearchcommandshape" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.1/Search/Customsearchcommandshape&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Query&lt;BR /&gt;
1) How to send data from python to splunk? (splunk.Intersplunk.outputResults(results))&lt;BR /&gt;
2) how to get result same as Step 5 link&lt;BR /&gt;
3) is there any way, where as I may check that my python script is working properly? (any log or anywhere in UI) &lt;/P&gt;

&lt;P&gt;OR&lt;BR /&gt;
Share some custom command whereas I should be able to pass splunk data to receive data from python script???&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:03:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-command-giving-unexpected-result/m-p/391888#M114085</guid>
      <dc:creator>nadirriyani</dc:creator>
      <dc:date>2020-09-29T20:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Custom command  giving unexpected result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-command-giving-unexpected-result/m-p/391889#M114086</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
2 things can be tested here a bit further :&lt;BR /&gt;
1-What happens if you run this command through CLI? something like &lt;CODE&gt;$ splunk search "| shape&lt;/CODE&gt;. What output do you receive?&lt;BR /&gt;
2- What happens if you run something like this from splunk web - &lt;CODE&gt;index="main"|sourcetype="tutorial"|shape&lt;/CODE&gt;&lt;BR /&gt;
3- you of course need to restart splunk enterprise after making the configuration changes&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jun 2018 10:17:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-command-giving-unexpected-result/m-p/391889#M114086</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-06-17T10:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Custom command  giving unexpected result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-command-giving-unexpected-result/m-p/391890#M114087</link>
      <description>&lt;P&gt;Please find response&lt;BR /&gt;
1) &lt;BR /&gt;
Error in 'shape' command: You must provide a field argument.&lt;BR /&gt;
The search job has failed due to an error. You may be able view the job in the Job Inspector.&lt;BR /&gt;
2)&lt;BR /&gt;
FATAL: Error in 'shape' command: You must provide a field argument.&lt;/P&gt;

&lt;P&gt;3)I had already restarted splunk post changes in the configuration file.&lt;/P&gt;

&lt;P&gt;I am using splunk enterprise  7.11 version &lt;/P&gt;

&lt;P&gt;Have you run this example in your machine?&lt;BR /&gt;
which splunk version are you using?&lt;BR /&gt;
do I need to install any python lib?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 05:06:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-command-giving-unexpected-result/m-p/391890#M114087</guid>
      <dc:creator>nadirriyani</dc:creator>
      <dc:date>2018-06-18T05:06:26Z</dc:date>
    </item>
  </channel>
</rss>

