<?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: Change inputlookup to events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673418#M230593</link>
    <description>&lt;P&gt;I just changed the cron job.&amp;nbsp; I was just running it from the UI.&amp;nbsp;&amp;nbsp; Once I did that, I started getting alerts.&amp;nbsp; I need to do some more cleanup, but the problem is solved.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jan 2024 21:00:49 GMT</pubDate>
    <dc:creator>jwhughes58</dc:creator>
    <dc:date>2024-01-05T21:00:49Z</dc:date>
    <item>
      <title>Change outputlookup to events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673402#M230583</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;The Bloodhound TA creates a KV store lookup.&amp;nbsp; I've been asked to take the entries in the KV store and turn them into events.&amp;nbsp; I've setup an alert, but I'm not seeing the alert fire.&amp;nbsp; The SPL looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup path_principals_lookup 
| eval domain_id=if(isnull(domain_id), "NULL_domain_id", domain_id) 
| eval domain_name=if(isnull(domain_name), "NULL_domain_name", domain_name) 
| eval group=if(isnull(group), "NULL_Group", group) 
| eval non_tier_zero_principal=if(isnull(non_tier_zero_principal), "NULL_non_tier_zero_principal", non_tier_zero_principal) 
| eval path_id=if(isnull(path_id), "NULL_path_id", path_id) 
| eval path_title=if(isnull(path_title), "NULL_path_title", path_title) 
| eval principal=if(isnull(principal), "NULL_principal", principal) 
| eval tier_zero_principal=if(isnull(tier_zero_principal), "NULL_tier_zero_principal", tier_zero_principal) 
| eval user=if(isnull(user), "NULL_user", user) 
| dedup domain_id, domain_name, group, non_tier_zero_principal, path_id, path_title, principal, tier_zero_principal, user&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see statistics, but that doesn't fire the alert.&amp;nbsp; Is there something I'm missing to turn the values in the kvstore into events to be alerted on?&lt;/P&gt;&lt;P&gt;TIA,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 18:29:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673402#M230583</guid>
      <dc:creator>jwhughes58</dc:creator>
      <dc:date>2024-01-05T18:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Change outputlookup to events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673407#M230584</link>
      <description>&lt;P&gt;When you say you have set up an alert, what are your configured Trigger Conditions and then the following Alert Actions that follow?&lt;BR /&gt;These can be found in the Edit Alert menu and looks like this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dtburrows3_0-1704481778641.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28779iC83D878857CDB29F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dtburrows3_0-1704481778641.png" alt="dtburrows3_0-1704481778641.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Where does the outputlookup come into play here? I dont see it in you SPL shared but it is in the title.&lt;BR /&gt;From just the title of this question alone it sounds like you would like to gather results and instead of storing them in a lookup to send them to a summary index via alert_action or collect command.&lt;BR /&gt;&lt;BR /&gt;But from the body of the question it sounds like you are just having issues seeing results of a scheduled search trigger an alert. If you run the search ad-hoc and are seeing results, then I would check Trigger conditions, the configured alert actions if the trigger conditions are met.&amp;nbsp;&lt;BR /&gt;If those look good then I would check the ownership of the Alert itself and does the owner have access to the KVStore.&lt;BR /&gt;&lt;BR /&gt;You should be able to look into internal logs about the status of previous runs as well with something like this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal savedsearch_name="&amp;lt;alert_name&amp;gt;"
    | table _time, savedsearch_name, user, app, status, dispatch_time, run_time, result_count, alert_actions, action_time_ms&lt;/LI-CODE&gt;&lt;P&gt;where &amp;lt;alert_name&amp;gt; is the name of your alert.&lt;BR /&gt;&lt;BR /&gt;I also noticed on your search that you had a lot of eval doing sort of the same function, I think a foreach loop might be useful here if you want to try it out.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup path_principals_lookup
    | foreach domain_id, domain_name, group, non_tier_zero_principal, path_id, path_title, principal, tier_zero_principal, user
        [
            | eval
                &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=if(
                    isnull('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'), 
                        "NULL_&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;", 
                        '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'
                    )
            ]
    | dedup domain_id, domain_name, group, non_tier_zero_principal, path_id, path_title, principal, tier_zero_principal, user&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Jan 2024 19:30:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673407#M230584</guid>
      <dc:creator>dtburrows3</dc:creator>
      <dc:date>2024-01-05T19:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Change inputlookup to events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673408#M230585</link>
      <description>&lt;P&gt;The outputlookup should have been inputlookup.&amp;nbsp; My brain slipped a gear when I was entering the Subject.&amp;nbsp; I have corrected it.&amp;nbsp; Here is what I have in the alert.&amp;nbsp; I should give the foreach a try.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 19:43:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673408#M230585</guid>
      <dc:creator>jwhughes58</dc:creator>
      <dc:date>2024-01-05T19:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Change outputlookup to events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673409#M230586</link>
      <description>&lt;P&gt;Cool.&amp;nbsp; Not quite as fast as the original method, but the difference is minuscule.&amp;nbsp; I do like the fact that I don't have to repeat the same command.&amp;nbsp; This is nice to know.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 19:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673409#M230586</guid>
      <dc:creator>jwhughes58</dc:creator>
      <dc:date>2024-01-05T19:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Change inputlookup to events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673415#M230590</link>
      <description>&lt;P&gt;Okay so I think since your trigger condition is&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;search count&amp;gt;0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It suspect is not firing because there is no field named 'count' for that to evaluate as true.&lt;BR /&gt;&lt;BR /&gt;Can you try this setting instead? (it should be the same logic as intended)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dtburrows3_0-1704486100885.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/28780i67E3CC1E742F1B3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dtburrows3_0-1704486100885.png" alt="dtburrows3_0-1704486100885.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As long as the KVStore has results in it, then your alert action should trigger every time the scheduler kick off the search.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 20:28:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673415#M230590</guid>
      <dc:creator>dtburrows3</dc:creator>
      <dc:date>2024-01-05T20:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Change inputlookup to events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673416#M230591</link>
      <description>&lt;P&gt;I've tried that and I didn't see anything.&amp;nbsp; I tried it again and I still don't see the alert firing.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 20:32:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673416#M230591</guid>
      <dc:creator>jwhughes58</dc:creator>
      <dc:date>2024-01-05T20:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Change inputlookup to events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673417#M230592</link>
      <description>&lt;P&gt;Just a follow up, are you readjusting the cron schedule to fire soon after making the adjustment to test?&lt;BR /&gt;I'm not sure if an alert action will trigger by just doing an "Open in Search" or "Run" action from the UI. I think the scheduler may have to kick off the search for the alert actions to be applied. (unless using the "| sendalert command")&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 20:39:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673417#M230592</guid>
      <dc:creator>dtburrows3</dc:creator>
      <dc:date>2024-01-05T20:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Change inputlookup to events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673418#M230593</link>
      <description>&lt;P&gt;I just changed the cron job.&amp;nbsp; I was just running it from the UI.&amp;nbsp;&amp;nbsp; Once I did that, I started getting alerts.&amp;nbsp; I need to do some more cleanup, but the problem is solved.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 21:00:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673418#M230593</guid>
      <dc:creator>jwhughes58</dc:creator>
      <dc:date>2024-01-05T21:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Change inputlookup to events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673419#M230594</link>
      <description>&lt;P&gt;Awesome! Glad you got it resolved!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 21:01:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Change-outputlookup-to-events/m-p/673419#M230594</guid>
      <dc:creator>dtburrows3</dc:creator>
      <dc:date>2024-01-05T21:01:59Z</dc:date>
    </item>
  </channel>
</rss>

