<?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: Extracting Text/Field from _raw Microsoft Event For Failed Backups in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Extracting-Text-Field-from-raw-Microsoft-Event-For-Failed/m-p/305156#M5687</link>
    <description>&lt;P&gt;So, this is what I've tried and it seems to work:&lt;/P&gt;

&lt;P&gt;|rex field=_raw "BACKUP DATABASE (?[^\s]+). Check"&lt;/P&gt;

&lt;P&gt;Is there a better way?  I'm not sure if this will miss any events.  Maybe there is a better way.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Nov 2017 19:28:08 GMT</pubDate>
    <dc:creator>SplunkLunk</dc:creator>
    <dc:date>2017-11-27T19:28:08Z</dc:date>
    <item>
      <title>Extracting Text/Field from _raw Microsoft Event For Failed Backups</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Extracting-Text-Field-from-raw-Microsoft-Event-For-Failed/m-p/305155#M5686</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;

&lt;P&gt;I want to run a report/alert when a MSSQL backup job has failed.  It looks like the info I want is only displayed in the _raw field.  Can anyone tell me how I can use the rex command to get the name of the database that has failed?  The _raw event data looks like this:&lt;/P&gt;

&lt;P&gt;2017-11-27 12:34:33.71 Backup BACKUP failed to complete the command BACKUP DATABASE WideWorldImportersDW. Check the backup application log for detailed messages.&lt;/P&gt;

&lt;P&gt;The name of the database in this case is "WideWorldImportersDW".  However, other database names will always be sandwiched between "BACKUP DATABASE" and ". Check"  Can someone help me craft the rex expression to give me the text between "BACKUP DATABASE" and ". Check"?  Thanks for any assistance.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 19:11:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Extracting-Text-Field-from-raw-Microsoft-Event-For-Failed/m-p/305155#M5686</guid>
      <dc:creator>SplunkLunk</dc:creator>
      <dc:date>2017-11-27T19:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Text/Field from _raw Microsoft Event For Failed Backups</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Extracting-Text-Field-from-raw-Microsoft-Event-For-Failed/m-p/305156#M5687</link>
      <description>&lt;P&gt;So, this is what I've tried and it seems to work:&lt;/P&gt;

&lt;P&gt;|rex field=_raw "BACKUP DATABASE (?[^\s]+). Check"&lt;/P&gt;

&lt;P&gt;Is there a better way?  I'm not sure if this will miss any events.  Maybe there is a better way.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 19:28:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Extracting-Text-Field-from-raw-Microsoft-Event-For-Failed/m-p/305156#M5687</guid>
      <dc:creator>SplunkLunk</dc:creator>
      <dc:date>2017-11-27T19:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Text/Field from _raw Microsoft Event For Failed Backups</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Extracting-Text-Field-from-raw-Microsoft-Event-For-Failed/m-p/305157#M5688</link>
      <description>&lt;P&gt;Do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Search Here
| rex "BACKUP DATABASE (?&amp;lt;DBName&amp;gt;\S+). Check"
| search NOT DBName="*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Refine your &lt;CODE&gt;rex&lt;/CODE&gt; until none of your events are making  it past the last search filter line.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 20:37:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Extracting-Text-Field-from-raw-Microsoft-Event-For-Failed/m-p/305157#M5688</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-11-27T20:37:02Z</dc:date>
    </item>
  </channel>
</rss>

