<?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: Keep specific events and discard the rest in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Keep-specific-events-and-discard-the-rest/m-p/34597#M6259</link>
    <description>&lt;P&gt;I have updated my previous answer. I don't think the other answer will work for you, as there are spaces in your data...&lt;/P&gt;</description>
    <pubDate>Mon, 26 Nov 2012 21:57:43 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2012-11-26T21:57:43Z</dc:date>
    <item>
      <title>Keep specific events and discard the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Keep-specific-events-and-discard-the-rest/m-p/34593#M6255</link>
      <description>&lt;P&gt;Yes i have seen the documentation and i am having probelm getting my stanza's to work. I just want to grab Directory Administrators and Master Web Resource Admins and get rid of the rest of the messages since we will not be doing anything with them.&lt;/P&gt;

&lt;P&gt;Here is props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/n01/data/bsm/hand/access.20121113-082934]
TRANSFORMS-set= setnullldap,setparsingldap
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnullldap]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[setparsingldap]
REGEX = Directory Administrators|Master Web Resource Admins
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;SAMPLE OF RAW DATA THAT I WANT TO KEEP BECAUSE IT INCLUDES cn= Directory Administrators OR cn= Master Web Resource Admins. I want to discard the rest of the events besides the ones that have those two admins as CN's.&lt;/P&gt;

&lt;P&gt;SAMPLE DATA BELOW:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[13/Nov/2012:09:00:04 -0500] conn=6333991 op=163 SRCH base="cn=Master Web Resource Admins,obapp=PSC,o=Oblix,o=test.com" scope=0 filter="(obuniquememberStr=uid=appcdt2,ou=people,ou=intranet,dc=test,dc=com)" attrs="1.1"

[13/Nov/2012:09:00:05 -0500] conn=6333969 op=443 SRCH base="cn=Directory Administrators,o=Oblix,o=test" scope=0 filter="(obuniquememberStr=uid=appcdt2,ou=people,ou=intranet,dc=test,dc=com)" attrs="1.1"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If anymore information is needed please just post. Thank you guys so much. &lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2012 17:30:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Keep-specific-events-and-discard-the-rest/m-p/34593#M6255</guid>
      <dc:creator>Michael_Schyma1</dc:creator>
      <dc:date>2012-11-14T17:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Keep specific events and discard the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Keep-specific-events-and-discard-the-rest/m-p/34594#M6256</link>
      <description>&lt;P&gt;Your regex is broken. I think this may work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX =(?m) (?:Directory\sAdministrators)|(?:Master\sWeb\sResource\sAdmins)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, do you want to apply this to only a single file, or to all data of that sourcetype? To apply the transformation to only a single file seems unusual. It would be more typical to see&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetypehere]
TRANSFORMS-set= setnullldap,setparsingldap
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Nov 2012 18:12:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Keep-specific-events-and-discard-the-rest/m-p/34594#M6256</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-11-14T18:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Keep specific events and discard the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Keep-specific-events-and-discard-the-rest/m-p/34595#M6257</link>
      <description>&lt;P&gt;Hm i still did not get the results that i was looking for. I will post two samples of the raw data that i am looking at. The raw data is the data i want to keep because it has cn=Directory Administrators and cn=Master Web Resource Admins. Everything else i would like to discard.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2012 19:10:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Keep-specific-events-and-discard-the-rest/m-p/34595#M6257</guid>
      <dc:creator>Michael_Schyma1</dc:creator>
      <dc:date>2012-11-14T19:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Keep specific events and discard the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Keep-specific-events-and-discard-the-rest/m-p/34596#M6258</link>
      <description>&lt;P&gt;Try the below setup.&lt;BR /&gt;
Hope this work for you.&lt;/P&gt;

&lt;P&gt;[setnullldap]&lt;BR /&gt;
REGEX = [\d+\/\w+\/\d+:\d+:\d+:\d+\s+-\d+]&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[setparsingldap]&lt;BR /&gt;
REGEX = [\d+\/\w+\/\d+:\d+:\d+:\d+\s+-\d+].*(\Master\sWeb\sResource|\Directory\sAdministrators)&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = indexQueue&lt;/P&gt;

&lt;P&gt;[source::/n01/data/bsm/hand/access.20121113-082934]&lt;BR /&gt;
Linebreaking =[\d+\/\w+\/\d+:\d+:\d+:\d+\s+-\d+]&lt;BR /&gt;
TRANSFORMS-set= setnullldap,setparsingldap&lt;/P&gt;

&lt;P&gt;I did the similar setup recently, it worked fine for me.&lt;BR /&gt;
If need more information .&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2012 10:42:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Keep-specific-events-and-discard-the-rest/m-p/34596#M6258</guid>
      <dc:creator>bharathi86</dc:creator>
      <dc:date>2012-11-26T10:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Keep specific events and discard the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Keep-specific-events-and-discard-the-rest/m-p/34597#M6259</link>
      <description>&lt;P&gt;I have updated my previous answer. I don't think the other answer will work for you, as there are spaces in your data...&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2012 21:57:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Keep-specific-events-and-discard-the-rest/m-p/34597#M6259</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-11-26T21:57:43Z</dc:date>
    </item>
  </channel>
</rss>

