<?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: Why is Lookup before transforming command not producing any results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-Lookup-before-transforming-command-not-producing-any/m-p/378413#M110920</link>
    <description>&lt;P&gt;Does this give you a list of 4-digit Site values?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=network_wan_circuits InterfaceName=200 earliest=-1h
| rex field=Location "(Location)?(?&amp;lt;Site&amp;gt;\d{4})"
| stats values(Site) BY Location
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If not, then either you do not have &lt;CODE&gt;Location&lt;/CODE&gt; fields or you do not have the correct &lt;CODE&gt;rex&lt;/CODE&gt;.  In so, I would try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=network_wan_circuits InterfaceName=200 earliest=-1h
| rex field=Location "(?:Location)?(?&amp;lt;Site&amp;gt;\d+)"
| lookup network_attributes.csv Site OUTPUT Tunnel100_Down_or_In_Speed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And if not that, then maybe this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=network_wan_circuits InterfaceName=200 earliest=-1h
| rex field=Location "(?:Location)?(?&amp;lt;Site&amp;gt;\d+)"
| eval Site=tonumber(Site)
| lookup network_attributes.csv Site OUTPUT Tunnel100_Down_or_In_Speed
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 28 Jul 2018 02:02:03 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2018-07-28T02:02:03Z</dc:date>
    <item>
      <title>Why is Lookup before transforming command not producing any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-Lookup-before-transforming-command-not-producing-any/m-p/378412#M110919</link>
      <description>&lt;P&gt;I have a network attributes sheet which contains all the details of the network devices across the enterprise, and i am looking to calculate the utilisation on those devices. FOr ex : i have to calculate bandwidth utilisation which requires two fields SPEED and incoming bytes. I have speed defined in a lookup for a site and for the same site i am having the incoming bytes in my index. I am trying to do a lookup but for some reason it doesnt produces the results , i tried to reproduce using makeresults and they work, but not the below query. It doesnt even produces any results . What could be the issue.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=network_wan_circuits InterfaceName=200 earliest=-1h 
| rex field=Location "(Location)?(?&amp;lt;Site&amp;gt;\d{4})" 
| lookup network_attributes.csv Site OUTPUT Tunnel100_Down_or_In_Speed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Testing using makeresults&lt;/EM&gt;&lt;/STRONG&gt;***&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval Site=tonumber(0115) | lookup network_attributes.csv Site OUTPUT Tunnel100_Down_or_In_Speed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above gives me the results.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jul 2018 00:21:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-Lookup-before-transforming-command-not-producing-any/m-p/378412#M110919</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-07-28T00:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Lookup before transforming command not producing any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-Lookup-before-transforming-command-not-producing-any/m-p/378413#M110920</link>
      <description>&lt;P&gt;Does this give you a list of 4-digit Site values?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=network_wan_circuits InterfaceName=200 earliest=-1h
| rex field=Location "(Location)?(?&amp;lt;Site&amp;gt;\d{4})"
| stats values(Site) BY Location
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If not, then either you do not have &lt;CODE&gt;Location&lt;/CODE&gt; fields or you do not have the correct &lt;CODE&gt;rex&lt;/CODE&gt;.  In so, I would try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=network_wan_circuits InterfaceName=200 earliest=-1h
| rex field=Location "(?:Location)?(?&amp;lt;Site&amp;gt;\d+)"
| lookup network_attributes.csv Site OUTPUT Tunnel100_Down_or_In_Speed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And if not that, then maybe this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=network_wan_circuits InterfaceName=200 earliest=-1h
| rex field=Location "(?:Location)?(?&amp;lt;Site&amp;gt;\d+)"
| eval Site=tonumber(Site)
| lookup network_attributes.csv Site OUTPUT Tunnel100_Down_or_In_Speed
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Jul 2018 02:02:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-Lookup-before-transforming-command-not-producing-any/m-p/378413#M110920</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-07-28T02:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Lookup before transforming command not producing any results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-Lookup-before-transforming-command-not-producing-any/m-p/378414#M110921</link>
      <description>&lt;P&gt;So what did you end up doing? Where was the problem?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 14:20:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-Lookup-before-transforming-command-not-producing-any/m-p/378414#M110921</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-08-02T14:20:20Z</dc:date>
    </item>
  </channel>
</rss>

