<?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 custom search command (v2/chunked) protocol documentation? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-custom-search-command-v2-chunked-protocol-documentation/m-p/641508#M11032</link>
    <description>&lt;P&gt;We recently added a page to the Custom Search Commands manual on dev.splunk.com that might have some of the information you're looking for:&amp;nbsp;&lt;A href="https://dev.splunk.com/enterprise/docs/devtools/customsearchcommands/nonpythonscscs" target="_blank"&gt;https://dev.splunk.com/enterprise/docs/devtools/customsearchcommands/nonpythonscscs&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 21:25:57 GMT</pubDate>
    <dc:creator>thellmann</dc:creator>
    <dc:date>2023-04-26T21:25:57Z</dc:date>
    <item>
      <title>How to custom search command (v2/chunked) protocol documentation?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-custom-search-command-v2-chunked-protocol-documentation/m-p/626442#M10896</link>
      <description>&lt;P&gt;The page &lt;A href="https://dev.splunk.com/enterprise/docs/devtools/customsearchcommands/nonpythonscscs/" target="_self"&gt;About non-Python custom search commands&lt;/A&gt; mentions that it is possible to write v2 custom search commands in languages other than Python, but there is absolutely no information about how such a thing would be implemented. What's the protocol?&lt;/P&gt;
&lt;P&gt;The closest thing to an explanation of the protocol I've found is &lt;A href="https://github.com/NDietrich/Splunk-CustomSearchProtocol-v2" target="_self"&gt;NDietrich's GitHub repo&lt;/A&gt;, and their accompanying talk which I find rather disappointing.&lt;/P&gt;
&lt;P&gt;How come there is no official information to be found about it?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 18:44:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-custom-search-command-v2-chunked-protocol-documentation/m-p/626442#M10896</guid>
      <dc:creator>spunk_enthusias</dc:creator>
      <dc:date>2023-03-30T18:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom search command (v2/chunked) protocol documentation</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-custom-search-command-v2-chunked-protocol-documentation/m-p/636748#M10984</link>
      <description>&lt;P&gt;Holy crap guys, I found some hints in the &lt;A href="https://splunkbase.splunk.com/app/4104" target="_self"&gt;Splunk Dev For All app&lt;/A&gt;!!! This has a fairly small (Python 2) utility library called "cexec" implementing the chunked search protocol! Here's a part of its docstring:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;This library abstracts away some of the low-level details of writing&lt;BR /&gt;"chunked" custom search commands for Splunk (e.g. byte-level protocol&lt;BR /&gt;parsing). However, it still requires a fair bit of background on how&lt;BR /&gt;the chunked protocol works at a semantic level. For a detailed&lt;BR /&gt;description of the protocol, read:&lt;P&gt;&lt;A href="https://confluence.splunk.com/display/PROD/Chunked+External+Command+Protocol+v1.0" target="_blank" rel="noopener"&gt;https://confluence.splunk.com/display/PROD/Chunked+External+Command+Protocol+v1.0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;At a high-level, the Splunk search pipeline operates on "chunks" of&lt;BR /&gt;search results. Thus, when a "chunked" custom search command is in a&lt;BR /&gt;search pipeline, Splunk will send chunks to the external command (on&lt;BR /&gt;stdin) and expect chunks in reply (on stdout).&lt;/P&gt;&lt;P&gt;This library implements a BaseChunkHandler class that handles most of&lt;BR /&gt;the details of receiving and sending chunks. Developers are expected&lt;BR /&gt;to extend this class with their own handler() method to actually do&lt;BR /&gt;useful work on search results.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Sadly the linked Confluence page is offline, not saved by the Internet Archive and a web search for "Chunked External Command Protocol v1.0" yields exactly 0 results (how often does that happen?).&lt;/P&gt;&lt;P&gt;Luckily the library only has 368 lines, is well commented and quite readable!&lt;/P&gt;&lt;P&gt;So that's probably some of the best documentation we have. Still baffling that Splunk Inc. seems to want to keep information about the chunked search protocol a secret. That together with the atrocious performance (200ms MINIMUM) makes using them for utility functionality inviable. And do you know what that means? We'll use the custom command exactly once and do all processing outside of Splunk.&lt;/P&gt;&lt;P&gt;If the bad experience of custom search commands is meant to hamper migration away, congratulations, you played yourselves.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 17:07:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-custom-search-command-v2-chunked-protocol-documentation/m-p/636748#M10984</guid>
      <dc:creator>spunk_enthusias</dc:creator>
      <dc:date>2023-03-30T17:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to custom search command (v2/chunked) protocol documentation?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-custom-search-command-v2-chunked-protocol-documentation/m-p/641508#M11032</link>
      <description>&lt;P&gt;We recently added a page to the Custom Search Commands manual on dev.splunk.com that might have some of the information you're looking for:&amp;nbsp;&lt;A href="https://dev.splunk.com/enterprise/docs/devtools/customsearchcommands/nonpythonscscs" target="_blank"&gt;https://dev.splunk.com/enterprise/docs/devtools/customsearchcommands/nonpythonscscs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 21:25:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-custom-search-command-v2-chunked-protocol-documentation/m-p/641508#M11032</guid>
      <dc:creator>thellmann</dc:creator>
      <dc:date>2023-04-26T21:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to custom search command (v2/chunked) protocol documentation?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-custom-search-command-v2-chunked-protocol-documentation/m-p/643206#M11056</link>
      <description>&lt;P&gt;Thank you, but ... what do I do with that?&lt;/P&gt;&lt;P&gt;Say I want to implement a command in Java. The page has a helpful side note on the java path, but the table says to implement a command in Python I have to use ... The Splunk SDK for Python? And the guide just stops at how to point Splunk to my application, which is like 5% of the way there.&lt;/P&gt;&lt;P&gt;Do you expect people to know the protocol already? Because again, I don't see ANY documentation on it and I don't find the Python source to be all that readable either, though arguably that *is* the best documentation I've seen.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A hint on how the DB Connect folks did it would be helpful. Though then again they also use a ton of shims until they get to launch their java app, but at least the protocol appears to be implemented there.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 12:34:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-custom-search-command-v2-chunked-protocol-documentation/m-p/643206#M11056</guid>
      <dc:creator>spunk_enthusias</dc:creator>
      <dc:date>2023-05-12T12:34:29Z</dc:date>
    </item>
  </channel>
</rss>

