<?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: Identify missing events based Lookup list of values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Identify-missing-events-based-Lookup-list-of-values/m-p/535876#M151480</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;. It worked..&lt;/P&gt;&lt;P&gt;Only change i made was to rename the event field name (job_code) to match the lookup field name (jobCode)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=default source=jobfeed 
| stats count BY job_code
| rename job_code as jobCode
| append [ | inputlookup jobs.csv | eval count=0 | fields jobCode count ]
| stats sum(count) AS total BY jobCode
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jan 2021 17:02:34 GMT</pubDate>
    <dc:creator>rangarbus</dc:creator>
    <dc:date>2021-01-14T17:02:34Z</dc:date>
    <item>
      <title>Identify missing events based Lookup list of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identify-missing-events-based-Lookup-list-of-values/m-p/535700#M151408</link>
      <description>&lt;P&gt;Hey Team&lt;/P&gt;&lt;P&gt;I have events which contains a field "job_code".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;index=default source=jobfeed&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I have a lookup (jobs.csv) which has the list of allowed job codes.&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50.12870012870013%" height="25px"&gt;&lt;EM&gt;jobCode&lt;/EM&gt;&lt;/TD&gt;&lt;TD width="49.87129987129987%" height="25px"&gt;&lt;EM&gt;jobDesc&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50.12870012870013%" height="25px"&gt;&lt;EM&gt;000&lt;/EM&gt;&lt;/TD&gt;&lt;TD width="49.87129987129987%" height="25px"&gt;&lt;EM&gt;EX&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50.12870012870013%" height="25px"&gt;&lt;EM&gt;001&lt;/EM&gt;&lt;/TD&gt;&lt;TD width="49.87129987129987%" height="25px"&gt;&lt;EM&gt;PT&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My requirement is to generate an alert every day,&amp;nbsp;&lt;SPAN&gt;If any of the jobCode available in lookup didn't show up at all on the events for past 2 days.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For instance,&amp;nbsp; for past 2 days if splunk didn't receive event with job_code as 000 , then i need an alert.&lt;/P&gt;&lt;P&gt;I need this check for all the jobCode in the lookup table.&lt;/P&gt;&lt;P&gt;Can you please help me with a query for this?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 18:51:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identify-missing-events-based-Lookup-list-of-values/m-p/535700#M151408</guid>
      <dc:creator>rangarbus</dc:creator>
      <dc:date>2021-01-13T18:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Identify missing events based Lookup list of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identify-missing-events-based-Lookup-list-of-values/m-p/535791#M151445</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226197"&gt;@rangarbus&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;it's the same solution to identify missing hosts, something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=default source=jobfeed 
| stats count BY job_code
| append [ | inputlookup jobs.csv | eval count=0 | fields job_code count ]
| stats sum(count) AS total BY host
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can define the scheduling and related timeperiod fo this alert (e.g. 24 h).&lt;/P&gt;&lt;P&gt;In few words: total=0 means that the zero value is from lookup and you haven't any log from the main search.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 09:08:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identify-missing-events-based-Lookup-list-of-values/m-p/535791#M151445</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-14T09:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Identify missing events based Lookup list of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identify-missing-events-based-Lookup-list-of-values/m-p/535876#M151480</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;. It worked..&lt;/P&gt;&lt;P&gt;Only change i made was to rename the event field name (job_code) to match the lookup field name (jobCode)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=default source=jobfeed 
| stats count BY job_code
| rename job_code as jobCode
| append [ | inputlookup jobs.csv | eval count=0 | fields jobCode count ]
| stats sum(count) AS total BY jobCode
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 17:02:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identify-missing-events-based-Lookup-list-of-values/m-p/535876#M151480</guid>
      <dc:creator>rangarbus</dc:creator>
      <dc:date>2021-01-14T17:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Identify missing events based Lookup list of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identify-missing-events-based-Lookup-list-of-values/m-p/535882#M151481</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226197"&gt;@rangarbus&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm sorry with you becase I wasn't so explicit:&lt;/P&gt;&lt;P&gt;with the above search, using the condition "| where total=0" you take only the job_codes that are in the lookup but not in the search!&lt;/P&gt;&lt;P&gt;The solution is just to solve the problem that when a job_codes is missing it isn't in the main search result, for this reason you added the subsearch with the count=0:&lt;/P&gt;&lt;P&gt;total=0 means that you haven't results in the main search and the job_codes are missing.&lt;/P&gt;&lt;P&gt;Running the search without the condition "| where total=0", you have both the conditions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;if total&amp;gt;0 you have events for that job_code&lt;/LI&gt;&lt;LI&gt;if total=0 you haven't events for that job_code&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 17:06:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identify-missing-events-based-Lookup-list-of-values/m-p/535882#M151481</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-14T17:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Identify missing events based Lookup list of values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Identify-missing-events-based-Lookup-list-of-values/m-p/535955#M151505</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226197"&gt;@rangarbus&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 07:11:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Identify-missing-events-based-Lookup-list-of-values/m-p/535955#M151505</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-15T07:11:25Z</dc:date>
    </item>
  </channel>
</rss>

