<?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: add field to lookup in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544775#M10346</link>
    <description>&lt;P&gt;One last question;&lt;/P&gt;&lt;P&gt;How can I add a query to avoid duplicate lines in the csv file? I used the dedup command, but this does not prevent duplicate lines in the csv file.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Mar 2021 13:43:21 GMT</pubDate>
    <dc:creator>sfurkan</dc:creator>
    <dc:date>2021-03-22T13:43:21Z</dc:date>
    <item>
      <title>add field to lookup</title>
      <link>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544742#M10340</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When an alarm is triggered, I want a field inside the event (e.g user) to be added to a preexisting lookup file.&lt;/P&gt;&lt;P&gt;How can I do?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 08:09:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544742#M10340</guid>
      <dc:creator>sfurkan</dc:creator>
      <dc:date>2021-03-22T08:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: add field to lookup</title>
      <link>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544745#M10341</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231310"&gt;@sfurkan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;to do this, you have to modify the search in your alert adding at the end the row to modify in the lookup and using the outputlookup command.&lt;/P&gt;&lt;P&gt;The way to do this depends on your situation:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;if you have to add a new row to the lookup, it's the easiest situation because you have to add to the outputlookup command the option "append=true",&lt;/LI&gt;&lt;LI&gt;if you have to modify an existing row, you have to create a new table, containing all the rows of the lookup, modifying only the row related to the alert and then use the output lookup the covers all the rows in the lookup,&lt;/LI&gt;&lt;LI&gt;if at least you have a kv store, you have to modify the kvstore follwowing the instructions at&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Knowledge-Management/How-to-update-a-KV-store-field/m-p/298384" target="_blank"&gt;https://community.splunk.com/t5/Knowledge-Management/How-to-update-a-KV-store-field/m-p/298384&lt;/A&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 08:57:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544745#M10341</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-22T08:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: add field to lookup</title>
      <link>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544758#M10342</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;I want to add a row to an existing column in the csv file.&amp;nbsp;Existing records in the csv file should not be deleted.&lt;/P&gt;&lt;P&gt;For example, I want to take user information in the windows event and add it as a row.&lt;/P&gt;&lt;P&gt;Is it not possible to do it from the "trigger actions" section?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 12:29:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544758#M10342</guid>
      <dc:creator>sfurkan</dc:creator>
      <dc:date>2021-03-22T12:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: add field to lookup</title>
      <link>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544764#M10343</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231310"&gt;@sfurkan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as I said, if you need to add an entire row, you can add to the end of your alert searcvh:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| outputlookup your_lookup.csv append=true&lt;/LI-CODE&gt;&lt;P&gt;If instead you want to modifiy only one field of an existing row, the search is more complex.&lt;/P&gt;&lt;P&gt;Anyway&amp;nbsp;&lt;SPAN&gt;it isn't possible to do it from the "trigger actions" section.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ciao.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 13:00:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544764#M10343</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-22T13:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: add field to lookup</title>
      <link>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544774#M10345</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231310"&gt;@sfurkan&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;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 13:40:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544774#M10345</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-22T13:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: add field to lookup</title>
      <link>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544775#M10346</link>
      <description>&lt;P&gt;One last question;&lt;/P&gt;&lt;P&gt;How can I add a query to avoid duplicate lines in the csv file? I used the dedup command, but this does not prevent duplicate lines in the csv file.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 13:43:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544775#M10346</guid>
      <dc:creator>sfurkan</dc:creator>
      <dc:date>2021-03-22T13:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: add field to lookup</title>
      <link>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544776#M10347</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231310"&gt;@sfurkan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to update the timestamp in a lookup with two columns:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;host&lt;/LI&gt;&lt;LI&gt;last connection,&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;when a condition is trggered, you could run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index your_condition
| eval host=lower(host)
| stats latest(_time) AS latest BY host
| append [ | inputlookup | eval host=lower(host) | fields host latest ]
| stats max(latest) As latest By host
| outputlookup your_lookup&lt;/LI-CODE&gt;&lt;P&gt;In other words, you have to take the values from the search and from the lookup modifying only the values from the main search and savinf the results in the loolup.&lt;/P&gt;&lt;P&gt;If you could share your alert's search and the fields of your lookup I could be more precise&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 13:55:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/add-field-to-lookup/m-p/544776#M10347</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-03-22T13:55:22Z</dc:date>
    </item>
  </channel>
</rss>

