<?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: How to replace a  status with a new value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230373#M68288</link>
    <description>&lt;P&gt;Thanks - this did not make a difference in the results.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Nov 2015 16:51:27 GMT</pubDate>
    <dc:creator>_gkollias</dc:creator>
    <dc:date>2015-11-09T16:51:27Z</dc:date>
    <item>
      <title>How to replace a  status with a new value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230370#M68285</link>
      <description>&lt;P&gt;I have search I'm running to change the status of a particular error that is a false negative:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wertyu sourcetype=audit  "No valid format *"
| eval status = if(other=="No valid format*","SUCCESS",status)
| stats count latest(status) as status, latest(other) as other by FOO
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm still seeing FAILED as the status rather than success, and am not quite sure what's wrong here.&lt;/P&gt;

&lt;P&gt;Any insights would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2015 16:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230370#M68285</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2015-11-09T16:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a  status with a new value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230371#M68286</link>
      <description>&lt;P&gt;Hello &lt;BR /&gt;
&lt;CODE&gt;No valid format *&lt;/CODE&gt; is different from &lt;CODE&gt;No valid format*&lt;/CODE&gt; (there is no blank between the t and *).&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2015 16:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230371#M68286</guid>
      <dc:creator>clorne</dc:creator>
      <dc:date>2015-11-09T16:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a  status with a new value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230372#M68287</link>
      <description>&lt;P&gt;I'm not sure why you're testing to see if "No valid format" is present when you've told Splunk to only return events with that text.&lt;BR /&gt;
That said, try this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval status = if(match(other,"No valid format%"),"SUCCESS",status) | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Nov 2015 16:48:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230372#M68287</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-11-09T16:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a  status with a new value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230373#M68288</link>
      <description>&lt;P&gt;Thanks - this did not make a difference in the results.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2015 16:51:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230373#M68288</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2015-11-09T16:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a  status with a new value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230374#M68289</link>
      <description>&lt;P&gt;Thanks - I am testing to make sure that the search results are accurate before broadening the scope of the search.  Why not test this on data I know should give me what I would expect first? &lt;/P&gt;

&lt;P&gt;Unfortunately, I am still seeing FAILED as status rather than SUCCESS:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wertyu sourcetype=audit  "No valid format*"
| stats count latest(status) as status, latest(other) as other by FOO
| eval status = if(match(other,"No valid format%"),"SUCCESS",status)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Nov 2015 17:01:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230374#M68289</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2015-11-09T17:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a  status with a new value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230375#M68290</link>
      <description>&lt;P&gt;Can we see a sample of your data?  Have you verified the &lt;CODE&gt;other&lt;/CODE&gt; field contains the target text?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2015 17:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230375#M68290</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-11-09T17:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a  status with a new value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230376#M68291</link>
      <description>&lt;P&gt;Sure thing - here is a friendly sample of the log file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2015-11-04T13:20:34.319 -0500,1,{host=host},{BP|InvoiceAudit|STATUS ,[CODE]::No valid format for FOO.-
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;We use extractions before parsing the data, so any string in that placement is stored in the &lt;EM&gt;other&lt;/EM&gt; field.&lt;/P&gt;

&lt;P&gt;Also, we know it works since I am able to populate the results in the searches above.  The weird thing here is that the status isn't changing.&lt;/P&gt;

&lt;P&gt;Any thoughts?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2015 17:23:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230376#M68291</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2015-11-09T17:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a  status with a new value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230377#M68292</link>
      <description>&lt;P&gt;I confused the &lt;CODE&gt;match&lt;/CODE&gt; syntax with the &lt;CODE&gt;like&lt;/CODE&gt; syntax.  One of these should work for you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval status = if(like(other,"No valid format%"),"SUCCESS",status) | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval status = if(match(other,"No valid format\.*"),"SUCCESS",status) | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Nov 2015 17:32:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230377#M68292</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-11-09T17:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a  status with a new value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230378#M68293</link>
      <description>&lt;P&gt;Yes!  This worked:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wertyu sourcetype=audit  "No valid format*" earliest=-5d
 | eval status = if(match(other,"No valid format\.*"),"SUCCESS",status)  
 | stats count latest(status) as status, latest(other) as other by FOO
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2015 17:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230378#M68293</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2015-11-09T17:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a  status with a new value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230379#M68294</link>
      <description>&lt;P&gt;Glad to hear it.  Please accept the answer.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2015 17:58:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230379#M68294</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-11-09T17:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a  status with a new value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230380#M68295</link>
      <description>&lt;P&gt;It will not make a different as long as a non-word character is trailing. Those are caught as punctuations. But remember, you might not notice that its no difference, but the result set could be different.&lt;/P&gt;

&lt;P&gt;For example:&lt;BR /&gt;
"no valid format" will match results that contain the string "no valid format/" but not "no valid format ".&lt;/P&gt;

&lt;P&gt;Make sense?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 16:33:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-a-status-with-a-new-value/m-p/230380#M68295</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2015-11-10T16:33:10Z</dc:date>
    </item>
  </channel>
</rss>

