<?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 Specify span option value in bin command with map in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Specify-span-option-value-in-bin-command-with-map/m-p/698067#M237097</link>
    <description>&lt;P&gt;I try to use lookup to specify span option value in bin command with map&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup mylookupup.csv
| fields Index, SearchString ,Tdiv | map
[ search index="$Index$" _raw="*$SearchString$*"
| bin span="$Tdiv$" _time]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The previous request fails with&amp;nbsp; :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error in 'bin' command: The value for option span (Tdiv) is invalid. When span is expressed using a sub-second unit (ds, cs, ms, us), the span value needs to be &amp;lt; 1 second, and 1 second must be evenly divisible by the span value.&lt;/P&gt;&lt;P&gt;Example of values in Tdiv field :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;15m&lt;/LI&gt;&lt;LI&gt;1h&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;could you help me with this problem?&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2024 12:53:41 GMT</pubDate>
    <dc:creator>elensare</dc:creator>
    <dc:date>2024-09-03T12:53:41Z</dc:date>
    <item>
      <title>Specify span option value in bin command with map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Specify-span-option-value-in-bin-command-with-map/m-p/698067#M237097</link>
      <description>&lt;P&gt;I try to use lookup to specify span option value in bin command with map&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup mylookupup.csv
| fields Index, SearchString ,Tdiv | map
[ search index="$Index$" _raw="*$SearchString$*"
| bin span="$Tdiv$" _time]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The previous request fails with&amp;nbsp; :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error in 'bin' command: The value for option span (Tdiv) is invalid. When span is expressed using a sub-second unit (ds, cs, ms, us), the span value needs to be &amp;lt; 1 second, and 1 second must be evenly divisible by the span value.&lt;/P&gt;&lt;P&gt;Example of values in Tdiv field :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;15m&lt;/LI&gt;&lt;LI&gt;1h&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;could you help me with this problem?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 12:53:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Specify-span-option-value-in-bin-command-with-map/m-p/698067#M237097</guid>
      <dc:creator>elensare</dc:creator>
      <dc:date>2024-09-03T12:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Specify span option value in bin command with map</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Specify-span-option-value-in-bin-command-with-map/m-p/698072#M237099</link>
      <description>&lt;P&gt;I think I've seen this somewhere. For some reason &lt;EM&gt;map&lt;/EM&gt; sometimes behaves differently if the search is specified in square brackets and differently if it's passed as parameter to the &lt;EM&gt;search=&lt;/EM&gt; option.&lt;/P&gt;&lt;P&gt;Try the latter form (remembering about proper escaping)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup mylookupup.csv
| fields Index, SearchString ,Tdiv | map search="search index=\"$Index$\" _raw=\"*$SearchString$*\"
| bin span=\"$Tdiv$\" _time"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 13:26:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Specify-span-option-value-in-bin-command-with-map/m-p/698072#M237099</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-09-03T13:26:24Z</dc:date>
    </item>
  </channel>
</rss>

