<?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: Need help on Custom search command in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399596#M48740</link>
    <description>&lt;P&gt;Hi @PowerPacked&lt;/P&gt;

&lt;P&gt;Thanks for your help. I have added as you mentioned. But still no luck. I have configured this in deployer. Does this custom search command need to be configured only in search head and works only in search head?&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jun 2018 01:41:26 GMT</pubDate>
    <dc:creator>maniu1609</dc:creator>
    <dc:date>2018-06-22T01:41:26Z</dc:date>
    <item>
      <title>Need help on Custom search command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399594#M48738</link>
      <description>&lt;P&gt;I have created custom search command called "getmetricdemo". I have configured everything but I'm not getting output in splunk GUI when I run search query as "| getmetricdemo" . Here is my configuration details:&lt;/P&gt;

&lt;P&gt;commands.conf:&lt;/P&gt;

&lt;P&gt;[getmetricdemo]&lt;BR /&gt;
filename = system_python.path&lt;BR /&gt;
command.arg.1 = getmetricdemo.py&lt;BR /&gt;
generating = true&lt;BR /&gt;
supports_rawargs = true&lt;/P&gt;

&lt;P&gt;Since I'm invoking external processor, I gave python interpreter name in system_python.path file &lt;BR /&gt;
cat system_python.path&lt;/P&gt;

&lt;H1&gt;!/usr/bin/python&lt;/H1&gt;

&lt;P&gt;python program is running fine when I execute in Linux CLI:&lt;/P&gt;

&lt;P&gt;python getmetricdemo.py&lt;BR /&gt;
_time,aaaa,bbbbb&lt;BR /&gt;
1529492520.0,1,1&lt;BR /&gt;
1529492580.0,1,1&lt;BR /&gt;
1529492400.0,1,1&lt;BR /&gt;
1529492640.0,1,1&lt;BR /&gt;
1529492460.0,1,1&lt;/P&gt;

&lt;P&gt;Both system_python.path and getmetricdemo.py are located in /opt/splunk/etc/apps//bin directory.&lt;/P&gt;

&lt;P&gt;Could anyone please help me out here. Thanks in advance!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:07:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399594#M48738</guid>
      <dc:creator>maniu1609</dc:creator>
      <dc:date>2020-09-29T20:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Custom search command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399595#M48739</link>
      <description>&lt;P&gt;Hi @maniu1609&lt;/P&gt;

&lt;P&gt;you should also set info regarding the command in metadata ---- local.meta or default.meta&lt;/P&gt;

&lt;P&gt;[commands/commandname]&lt;BR /&gt;
export = system&lt;BR /&gt;
owner = nobody&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 16:13:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399595#M48739</guid>
      <dc:creator>PowerPacked</dc:creator>
      <dc:date>2018-06-21T16:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Custom search command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399596#M48740</link>
      <description>&lt;P&gt;Hi @PowerPacked&lt;/P&gt;

&lt;P&gt;Thanks for your help. I have added as you mentioned. But still no luck. I have configured this in deployer. Does this custom search command need to be configured only in search head and works only in search head?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 01:41:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399596#M48740</guid>
      <dc:creator>maniu1609</dc:creator>
      <dc:date>2018-06-22T01:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Custom search command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399597#M48741</link>
      <description>&lt;P&gt;Now i did few changes:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Removed #! from #!/usr/bin/python line in system_python.path file&lt;/LI&gt;
&lt;LI&gt;Added chunked = true in commands.conf file&lt;/LI&gt;
&lt;LI&gt;Restarted splunk&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;After doing above changes, I again ran search command, Now I could see below error in job inspector:&lt;/P&gt;

&lt;P&gt;06-22-2018 09:45:24.734 INFO  ChunkedExternProcessor - Running process: /usr/bin/python getmetricdemo.py&lt;BR /&gt;
06-22-2018 09:45:29.427 ERROR ChunkedExternProcessor - Failed attempting to parse transport header: _time,aaaa,bbbbb\r&lt;BR /&gt;
06-22-2018 09:45:29.427 ERROR ChunkedExternProcessor - Error in 'getmetricdemo' command: External search command exited unexpectedly.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 09:00:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399597#M48741</guid>
      <dc:creator>maniu1609</dc:creator>
      <dc:date>2018-06-22T09:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Custom search command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399598#M48742</link>
      <description>&lt;P&gt;all you need in commands is &lt;/P&gt;

&lt;P&gt;[getmetricdemo]&lt;BR /&gt;
filename=getmetricdemo.py&lt;BR /&gt;
passauth = true&lt;/P&gt;

&lt;P&gt;&amp;amp; the python file should be in the bin directory of the app, commands in local/default of the same app, meta file in metadata dir of same app.&lt;/P&gt;

&lt;P&gt;yes if its a cluster you need to push them from deployer to all search heads.&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 16:38:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399598#M48742</guid>
      <dc:creator>PowerPacked</dc:creator>
      <dc:date>2018-06-22T16:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Custom search command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399599#M48743</link>
      <description>&lt;P&gt;Have you found a solution to your problem? I am having the same issue.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 15:06:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399599#M48743</guid>
      <dc:creator>kiril123</dc:creator>
      <dc:date>2018-09-24T15:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on Custom search command</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399600#M48744</link>
      <description>&lt;P&gt;No @kiril123 &lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 13:34:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Need-help-on-Custom-search-command/m-p/399600#M48744</guid>
      <dc:creator>maniu1609</dc:creator>
      <dc:date>2018-09-25T13:34:55Z</dc:date>
    </item>
  </channel>
</rss>

