<?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: Modify lookup cells by search command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/313002#M93700</link>
    <description>&lt;P&gt;AppPID is not the key, therefore it didn't work for me. Any idea?&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2017 22:19:57 GMT</pubDate>
    <dc:creator>ICAP_RND</dc:creator>
    <dc:date>2017-02-21T22:19:57Z</dc:date>
    <item>
      <title>Modify lookup cells by search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/312997#M93695</link>
      <description>&lt;P&gt;I have a lookup called FailuresList&lt;BR /&gt;
It contains the following fields: &lt;STRONG&gt;date&lt;/STRONG&gt;, site, text, excluded&lt;BR /&gt;
I would like to modify the "excluded" from "No" to "Yes" of keys that their &lt;STRONG&gt;date&lt;/STRONG&gt; equals to &lt;STRONG&gt;DateT&lt;/STRONG&gt; extracted by the following search&lt;/P&gt;

&lt;P&gt;index=clientlogs  FailedApp=* OR "WorkflowServer.CloseApplication * pid:" | rex field=Message.Text "pid: (?\d+)"| transaction AppPID host startswith="WorkflowServer.CloseApplication * pid:" endswith="Application * failed" maxspan=60s  mvlist=f | eval &lt;STRONG&gt;dateT&lt;/STRONG&gt;=strftime((_time*1000+duration*1000)/1000,"%Y-%m-%d %H:%M:%S.%2N")&lt;/P&gt;

&lt;P&gt;How shall I do it?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:56:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/312997#M93695</guid>
      <dc:creator>ICAP_RND</dc:creator>
      <dc:date>2020-09-29T12:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lookup cells by search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/312998#M93696</link>
      <description>&lt;P&gt;Is this lookup kvstore of csv based?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 15:06:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/312998#M93696</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2017-02-21T15:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lookup cells by search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/312999#M93697</link>
      <description>&lt;P&gt;Hi ICAP_RND, if this lookup is csv based, the only option is to use &lt;CODE&gt;inputlookup&lt;/CODE&gt; to pull in the table, use search commands such as eval to adjust the fields as needed, and then outputlookup to rewrite the modified table to disk.&lt;/P&gt;

&lt;P&gt;If it is kvstore based, there are rest commands that can be used for pinpoint modification of specific table entries. More information is available here : &lt;A href="http://dev.splunk.com/view/SP-CAAAEZG"&gt;http://dev.splunk.com/view/SP-CAAAEZG&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please let me know if this answers your question!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 15:10:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/312999#M93697</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2017-02-21T15:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lookup cells by search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/313000#M93698</link>
      <description>&lt;P&gt;Assuming that the &lt;CODE&gt;key&lt;/CODE&gt; is &lt;CODE&gt;AppPID&lt;/CODE&gt;, try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=clientlogs FailedApp= OR "WorkflowServer.CloseApplication pid:" | rex field=Message.Text "pid: (?\d+)"| transaction AppPID host startswith="WorkflowServer.CloseApplication pid:" endswith="Application failed" maxspan=60s mvlist=f | eval dateT=strftime((_time*1000+duration*1000)/1000,"%Y-%m-%d %H:%M:%S.%2N") | fields AppPID dateT | append [|inputlookup MyLookupName] | stats values(*) AS * by AppPID | eval excluded = if((date=dateT), "Yes", excluded) | fields - dateT | outputlookup MyLookupName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Feb 2017 15:12:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/313000#M93698</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-02-21T15:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lookup cells by search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/313001#M93699</link>
      <description>&lt;P&gt;Another approach. This is updating exclude="Yes" for every date which are available in the search.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=clientlogs  FailedApp=* OR "WorkflowServer.CloseApplication * pid:" | rex field=Message.Text "pid: (?&amp;lt;AppPID&amp;gt;\d+)"| transaction AppPID host startswith="WorkflowServer.CloseApplication * pid:" endswith="Application * failed" maxspan=60s  mvlist=f | eval date=strftime((_time*1000+duration*1000)/1000,"%Y-%m-%d %H:%M:%S.%2N") | stats count by date | table date | eval exclude_new="Yes" | eval discard="yes"  | append [| inputlookup FailuresList] | eventstats values(exclude_new) as exclude_new by date | where discard!="yes"  |eval exclude=coalesce(exclude_new,exclude) | fields - exclude_new |    outputlookup FailuresList
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Feb 2017 15:31:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/313001#M93699</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-21T15:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lookup cells by search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/313002#M93700</link>
      <description>&lt;P&gt;AppPID is not the key, therefore it didn't work for me. Any idea?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 22:19:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/313002#M93700</guid>
      <dc:creator>ICAP_RND</dc:creator>
      <dc:date>2017-02-21T22:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Modify lookup cells by search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/313003#M93701</link>
      <description>&lt;P&gt;Instead of  &lt;EM&gt;where discard!="yes"&lt;/EM&gt;  you shall use &lt;EM&gt;where isnull(discard)&lt;/EM&gt; &lt;BR /&gt;
All the rest was perfectly matching. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 22:57:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Modify-lookup-cells-by-search-command/m-p/313003#M93701</guid>
      <dc:creator>ICAP_RND</dc:creator>
      <dc:date>2017-02-21T22:57:40Z</dc:date>
    </item>
  </channel>
</rss>

