<?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: Regex from EventCode 7035 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-from-EventCode-7035/m-p/83623#M21302</link>
    <description>&lt;P&gt;It picks up a few "blank" Extracted_Service_Name, but I think this will be, ok. I really appreciate it. I also see where I was going wrong. Thanks a lot!!!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 11:59:10 GMT</pubDate>
    <dc:creator>MrWh1t3</dc:creator>
    <dc:date>2020-09-28T11:59:10Z</dc:date>
    <item>
      <title>Regex from EventCode 7035</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-from-EventCode-7035/m-p/83621#M21300</link>
      <description>&lt;P&gt;I am trying to create a regex that will parse a portion of a sentence within a Windows Log event.&lt;/P&gt;

&lt;P&gt;As an example, EventCode=7035 generates the following:&lt;/P&gt;

&lt;P&gt;The Network Location Awareness (NLA) service was.....sent a start&lt;BR /&gt;
The Network Connection service was....sent a stop&lt;BR /&gt;
The HTTP service was....sent a start&lt;BR /&gt;
The HTTP service was....sent a stop&lt;BR /&gt;
etc...&lt;/P&gt;

&lt;P&gt;What I would like to parse out is, just the information between "The" and "service" and also the words start or stop.&lt;/P&gt;

&lt;P&gt;That way I can build a list of services there were started or stopped.&lt;/P&gt;

&lt;P&gt;So far I have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EventCode=7035 | dedup Message | rex field=Message "(?i)="The (.*?) service .*? (start|stop)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It doesn't seem to be working like I want. I would like it to output into table format along with the ComputerName Extracted_Service_Name and whether or not it was started or stopped.&lt;/P&gt;

&lt;P&gt;Thoughts on this?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:59:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-from-EventCode-7035/m-p/83621#M21300</guid>
      <dc:creator>MrWh1t3</dc:creator>
      <dc:date>2020-09-28T11:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Regex from EventCode 7035</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-from-EventCode-7035/m-p/83622#M21301</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EventCode=7035 
| dedup Message 
| rex field=Message "The (?&amp;lt;Extracted_Service_Name&amp;gt;.*?) service was .*? sent a (?&amp;lt;Action&amp;gt;start|stop)"
| table ComputerName Extracted_Service_Name Action
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Jun 2012 04:41:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-from-EventCode-7035/m-p/83622#M21301</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-06-26T04:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Regex from EventCode 7035</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-from-EventCode-7035/m-p/83623#M21302</link>
      <description>&lt;P&gt;It picks up a few "blank" Extracted_Service_Name, but I think this will be, ok. I really appreciate it. I also see where I was going wrong. Thanks a lot!!!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:59:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-from-EventCode-7035/m-p/83623#M21302</guid>
      <dc:creator>MrWh1t3</dc:creator>
      <dc:date>2020-09-28T11:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regex from EventCode 7035</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-from-EventCode-7035/m-p/83624#M21303</link>
      <description>&lt;P&gt;To get rid of the blanks,&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;EventCode=7035 &lt;BR /&gt;
| dedup Message &lt;BR /&gt;
| rex field=Message "The (?&amp;lt;Extracted_Service_Name&amp;gt;.*?) service was .*? sent a (?&amp;lt;Action&amp;gt;start|stop)"&lt;BR /&gt;
| where Extracted_Service_Name!=null()&lt;BR /&gt;
| table ComputerName Extracted_Service_Name Action&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But can you show an example of an event where it extracted blanks? I wonder if the regular expression could be better...&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2012 04:57:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-from-EventCode-7035/m-p/83624#M21303</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-06-26T04:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Regex from EventCode 7035</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-from-EventCode-7035/m-p/83625#M21304</link>
      <description>&lt;P&gt;Another concern I have - what if a service was started and stopped several times within your search time range? Because you are de-duping the Message, you would only see one start and one stop. Is this what you want? It would also be possible to count the number of starts/stops if you didn't dedup...&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2012 05:35:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-from-EventCode-7035/m-p/83625#M21304</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-06-26T05:35:00Z</dc:date>
    </item>
  </channel>
</rss>

