<?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: Is there a way to add an extra row based on a pre-defined list of stores if the stores don't exist in the search results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-add-an-extra-row-based-on-a-pre-defined-list/m-p/432403#M123550</link>
    <description>&lt;P&gt;This works great but its really slow.  I'll poke at it and see if there is a way to speed it up.  Thanks very much!&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2019 19:27:23 GMT</pubDate>
    <dc:creator>wesbrowntech</dc:creator>
    <dc:date>2019-06-21T19:27:23Z</dc:date>
    <item>
      <title>Is there a way to add an extra row based on a pre-defined list of stores if the stores don't exist in the search results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-add-an-extra-row-based-on-a-pre-defined-list/m-p/432401#M123548</link>
      <description>&lt;P&gt;I've searched around and I've been having a hard time finding an answer to this probably due to how I'm phrasing the issue.&lt;/P&gt;

&lt;P&gt;We have a search that returns logs with the field &lt;STRONG&gt;Store=&lt;/STRONG&gt; in it.  After transforming the data we end up with a table that looks like of like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Store | Result 1 | Result 2 | Result 3
123 | 4 | 15 | 2
231 | 5 | 5  | 34
987 | 3 | 2 | 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The issue I'm having is that lets say that Store 987 has 0 results, it won't be returned because there will be no logs to build that row off of.  Is there a way to add an extra row based on a pre-defined list of stores if the stores don't exist in the search results?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 21:50:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-add-an-extra-row-based-on-a-pre-defined-list/m-p/432401#M123548</guid>
      <dc:creator>wesbrowntech</dc:creator>
      <dc:date>2019-06-17T21:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to add an extra row based on a pre-defined list of stores if the stores don't exist in the search results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-add-an-extra-row-based-on-a-pre-defined-list/m-p/432402#M123549</link>
      <description>&lt;P&gt;Add a lookup file - stores.csv - that just lists you store numbers.&lt;/P&gt;

&lt;P&gt;then use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup stores.csv | join Store type=outer [search &amp;lt;your-search&amp;gt;] | fillnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The following search worked for me (I added a csv list of dummy hostname + one that matched my local server name into hosts_text.csv)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup hosts_test.csv|join hostname type=outer [search index=_internal |stats count by host|rename host as hostname] | fillnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Example hosts_test.csv for above search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;hostname
myserver
localhost
notaserver
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;count     hostname
4845       myserver
0         localhost
0         notaserver
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Jun 2019 22:54:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-add-an-extra-row-based-on-a-pre-defined-list/m-p/432402#M123549</guid>
      <dc:creator>stuartidelta01</dc:creator>
      <dc:date>2019-06-17T22:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to add an extra row based on a pre-defined list of stores if the stores don't exist in the search results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-add-an-extra-row-based-on-a-pre-defined-list/m-p/432403#M123550</link>
      <description>&lt;P&gt;This works great but its really slow.  I'll poke at it and see if there is a way to speed it up.  Thanks very much!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 19:27:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-add-an-extra-row-based-on-a-pre-defined-list/m-p/432403#M123550</guid>
      <dc:creator>wesbrowntech</dc:creator>
      <dc:date>2019-06-21T19:27:23Z</dc:date>
    </item>
  </channel>
</rss>

