<?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: Search events based on lookup field and display lookup row even if nothing found in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509521#M142401</link>
    <description>&lt;P&gt;try &lt;STRONG&gt;where&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jul 2020 13:36:51 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-07-16T13:36:51Z</dc:date>
    <item>
      <title>Search events based on lookup field and display lookup row even if nothing found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509405#M142361</link>
      <description>&lt;P&gt;I have a lookup file which contains a list of jobnames, description and their SLAs.&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;jobName&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Description&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;SLA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;job1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Example1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;08.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;job2&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Example2&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;10.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;job5&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Example3&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;05.00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My index data (index=autosys) contains events for hundreds of jobs, their status and updated time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;An event example would be: job1, FAILED, 07.00&lt;/P&gt;&lt;P&gt;I'm trying to write a query to output the below. However, there are cases where there won't be any events for a specific job. In that case, I need to display, "NOT RUNNING"&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;jobName&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Description&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;SLA&lt;/TD&gt;&lt;TD width="8.333333333333334%"&gt;Status&lt;/TD&gt;&lt;TD width="8.333333333333334%"&gt;Updatetime&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;job1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Example1&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;08.00&lt;/TD&gt;&lt;TD width="8.333333333333334%"&gt;FAILED&lt;/TD&gt;&lt;TD width="8.333333333333334%"&gt;07.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;job2&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Example2&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;10.00&lt;/TD&gt;&lt;TD width="8.333333333333334%"&gt;SUCCESS&lt;/TD&gt;&lt;TD width="8.333333333333334%"&gt;09.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;job5&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Example3&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;05.00&lt;/TD&gt;&lt;TD width="8.333333333333334%"&gt;NOT RUNNING&lt;/TD&gt;&lt;TD width="8.333333333333334%"&gt;NULL&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the following query, but it is not displaying the row that does not have any event/data in the index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup append=t lookup_job.csv | table jobName, SLA, Description
| join jobName [search index=autosys  | inputlookup lookup_job.csv | fields jobName ]]
| table jobName, Description, SLA, Status, Updatedtime&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 21:09:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509405#M142361</guid>
      <dc:creator>nomad1981</dc:creator>
      <dc:date>2020-07-15T21:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Search events based on lookup field and display lookup row even if nothing found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509406#M142362</link>
      <description>&lt;P&gt;index=autosys [|inputlookup lookup_job.csv | table jobName| format]&lt;BR /&gt;| lookup lookup_job.csv&amp;nbsp; jobName OUTPUT&amp;nbsp;Description, SLA&lt;BR /&gt;| table jobName, Description, SLA, Status, Updatedtime&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 21:26:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509406#M142362</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-15T21:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Search events based on lookup field and display lookup row even if nothing found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509416#M142366</link>
      <description>&lt;P&gt;Unfortunately, the query does not return the item from the lookup if there are no events found.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I need the results to the displayed in the same order of jobName as per what is in the lookup file&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 22:42:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509416#M142366</guid>
      <dc:creator>nomad1981</dc:creator>
      <dc:date>2020-07-15T22:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Search events based on lookup field and display lookup row even if nothing found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509495#M142388</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=autosys 
| table jobName Status Updatedtime
| inputlookup append=t lookup_job.csv
| table jobName, Description, SLA, Status, Updatedtime
| fillnull status value="NOT RUNNING"
| stats values(*) as * by jobName&lt;/LI-CODE&gt;&lt;P&gt;Like this?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 10:44:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509495#M142388</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-16T10:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search events based on lookup field and display lookup row even if nothing found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509506#M142394</link>
      <description>&lt;P&gt;That query returns all jobs in found in the search index autosys.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to return the data that's in the lookup table as is and add 2 additional columns (Status and Updatedtime) which is found in the index data. If the search does not find the Status and Updatedtime for a specfic job, that job should still appear in the table with the 2 fields showing as "NOT RUNNING".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 12:22:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509506#M142394</guid>
      <dc:creator>nomad1981</dc:creator>
      <dc:date>2020-07-16T12:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Search events based on lookup field and display lookup row even if nothing found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509521#M142401</link>
      <description>&lt;P&gt;try &lt;STRONG&gt;where&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 13:36:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509521#M142401</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-16T13:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search events based on lookup field and display lookup row even if nothing found</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509543#M142411</link>
      <description>&lt;P&gt;I was able to sort it out using join type=left&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup append=t lookup_job.csv | table jobName, SLA, Description
| join type=left jobName [search index=autosys  | inputlookup lookup_job.csv | fields jobName ]]
| table jobName, Description, SLA, Status, Updatedtime&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 15:36:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-events-based-on-lookup-field-and-display-lookup-row-even/m-p/509543#M142411</guid>
      <dc:creator>nomad1981</dc:creator>
      <dc:date>2020-07-16T15:36:16Z</dc:date>
    </item>
  </channel>
</rss>

