<?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 can I put the status into 1 when the log has &amp;quot;failed&amp;quot;? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451821#M173195</link>
    <description>&lt;P&gt;Hi how do you say that the log has failed? is there a status field or is there any search term?&lt;BR /&gt;
also put your query in &lt;CODE&gt;101010&lt;/CODE&gt; sample code .&lt;/P&gt;</description>
    <pubDate>Mon, 04 Feb 2019 11:43:09 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2019-02-04T11:43:09Z</dc:date>
    <item>
      <title>How can I put the status into 1 when the log has "failed"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451820#M173194</link>
      <description>&lt;P&gt;I'm creating oracle RMAN chart and need the status when failed then the status should be 1 normally it should be 0.&lt;BR /&gt;
For example,&lt;/P&gt;

&lt;P&gt;index="oracle" BKUPTYPE OR ORACLE_NAME OR Starting OR complete | transaction source | rex "ORACLE_NAME\s*:\s*(?\w+)"  | rex "BKUPTYPE\s*:\s*(?\w+)" | where BKUPTYPE != "ARCHIVE" | EVAL name_type = ORACLE_NAME+"_"+BKUPTYPE | EVAL duration=duration*1000  | EVAL status=??? | table _time, name_type, status, duration&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:08:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451820#M173194</guid>
      <dc:creator>shiranaka</dc:creator>
      <dc:date>2020-09-29T23:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I put the status into 1 when the log has "failed"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451821#M173195</link>
      <description>&lt;P&gt;Hi how do you say that the log has failed? is there a status field or is there any search term?&lt;BR /&gt;
also put your query in &lt;CODE&gt;101010&lt;/CODE&gt; sample code .&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 11:43:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451821#M173195</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-02-04T11:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I put the status into 1 when the log has "failed"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451822#M173196</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;
"failed" is output into the log, normally "completed" without the status field..&lt;/P&gt;

&lt;P&gt;Normally I just extract 4 rows like this.&lt;BR /&gt;
2019-02-06 09:40:01&amp;gt;open_logs:  ORACLE_NAME  : xxx&lt;BR /&gt;
2019-02-06 09:40:01&amp;gt;open_logs:  BKUPTYPE     : ARCHIVE&lt;BR /&gt;
2019-02-06 09:40:19&amp;gt;do_backup: Starting ARCHIVE database backup...&lt;BR /&gt;
2019-02-06 09:49:47&amp;gt;do_backup: Database backup complete.&lt;BR /&gt;
It does not have any status field.&lt;/P&gt;

&lt;P&gt;when failed, additionally something like below will be output into the log.&lt;BR /&gt;
RMAN-03002: failure of recover command at 02/04/2019 23:07:19&lt;BR /&gt;
ORA-19870: error while restoring backup piece /BACKUPS/xxx/budump/xxx_20190127_224906_1&lt;BR /&gt;
ORA-19505: failed to identify file "/BACKUPS/xxx/budump/xxx_20190127_224906_1"&lt;BR /&gt;
ORA-27037: unable to obtain file status&lt;BR /&gt;
I need to make something like status field from the log above.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:05:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451822#M173196</guid>
      <dc:creator>shiranaka</dc:creator>
      <dc:date>2020-09-29T23:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: How can I put the status into 1 when the log has "failed"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451823#M173197</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;eval status= if(match(_raw,"failed"), 1, 0)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 04:33:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451823#M173197</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-02-06T04:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can I put the status into 1 when the log has "failed"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451824#M173198</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;
It's perfect for me and I could complete very useful dashboard for RMAN.&lt;BR /&gt;
Thank you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 00:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451824#M173198</guid>
      <dc:creator>shiranaka</dc:creator>
      <dc:date>2019-02-07T00:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can I put the status into 1 when the log has "failed"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451825#M173199</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;
It's perfect for me and I could complete useful RMAN dashboard.&lt;BR /&gt;
Thank you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 00:06:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-put-the-status-into-1-when-the-log-has-quot-failed/m-p/451825#M173199</guid>
      <dc:creator>shiranaka</dc:creator>
      <dc:date>2019-02-07T00:06:15Z</dc:date>
    </item>
  </channel>
</rss>

