<?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: Run a generating command over a set of values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Run-a-generating-command-over-a-set-of-values/m-p/528263#M149156</link>
    <description>&lt;P&gt;You can use the map command&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| map maxsearches=100 search="
  | rest services/search/jobs/$search_id$ splunk_server=local
  | table *
"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.0/SearchReference/Map" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.0/SearchReference/Map&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, there are some runtime and performance limits that will affect how many ids you can run over.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2020 03:40:22 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2020-11-06T03:40:22Z</dc:date>
    <item>
      <title>Run a generating command over a set of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Run-a-generating-command-over-a-set-of-values/m-p/528256#M149151</link>
      <description>&lt;P&gt;I have a search that will return a number of search ids.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;index=_audit | &amp;lt;various modifications&amp;gt;| table search_id&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Example.. I end up with&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;search_id&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;1604617764.7885_5E002618-3E1F-491E-88C9-516508A9DB66&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1604617764.7886_5E002618-3E1F-491E-88C9-516508A9DB66&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1604617764.7887_5E002618-3E1F-491E-88C9-516508A9DB66&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Now for each of search_id I want to do a rest call to find out information about the search&lt;/P&gt;&lt;P&gt;For example, for the first search_id I want to call:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;| rest services/search/jobs/1604617764.7885_5E002618-3E1F-491E-88C9-516508A9DB66 splunk_server=local&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Since &lt;FONT face="courier new,courier"&gt;| rest&lt;/FONT&gt; is a generating command, I can't figure out how to do this.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 02:24:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Run-a-generating-command-over-a-set-of-values/m-p/528256#M149151</guid>
      <dc:creator>burwell</dc:creator>
      <dc:date>2020-11-06T02:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Run a generating command over a set of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Run-a-generating-command-over-a-set-of-values/m-p/528263#M149156</link>
      <description>&lt;P&gt;You can use the map command&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| map maxsearches=100 search="
  | rest services/search/jobs/$search_id$ splunk_server=local
  | table *
"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.0/SearchReference/Map" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.0/SearchReference/Map&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, there are some runtime and performance limits that will affect how many ids you can run over.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 03:40:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Run-a-generating-command-over-a-set-of-values/m-p/528263#M149156</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-11-06T03:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Run a generating command over a set of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Run-a-generating-command-over-a-set-of-values/m-p/528268#M149158</link>
      <description>Hi&lt;BR /&gt;Map is exactly correct command for this kind of task. Small fix to your example “rest /services/...” for someone else who are not so familiar with splunk.&lt;BR /&gt;r. Ismo</description>
      <pubDate>Fri, 06 Nov 2020 06:02:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Run-a-generating-command-over-a-set-of-values/m-p/528268#M149158</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-11-06T06:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Run a generating command over a set of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Run-a-generating-command-over-a-set-of-values/m-p/528362#M149188</link>
      <description>&lt;P&gt;The map command was exactly what I needed. And thanks for the correction of the services command (works with/without first /)&lt;BR /&gt;&lt;BR /&gt;Also, if you have other fields you want to refer to in map use $field$&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 19:26:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Run-a-generating-command-over-a-set-of-values/m-p/528362#M149188</guid>
      <dc:creator>burwell</dc:creator>
      <dc:date>2020-11-06T19:26:45Z</dc:date>
    </item>
  </channel>
</rss>

