<?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: filtering logs before indexing in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393338#M70237</link>
    <description>&lt;P&gt;Thank you .How to add another event name in that REGEX , is there a syntax to add and ca the stanza TRANSFORMS-drop_eventname_getobject = drop_eventname_getobject be used for all multiple source types if they have the same kind of data or do we need to create another one?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 01:29:16 GMT</pubDate>
    <dc:creator>vrmandadi</dc:creator>
    <dc:date>2020-09-30T01:29:16Z</dc:date>
    <item>
      <title>filtering logs before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393334#M70233</link>
      <description>&lt;P&gt;I have json type of data and below is the sample events .I want to filter out the events which have the field called event name with &lt;BR /&gt;
 vale GetObject    i.e .  eventName=GetObject &lt;/P&gt;

&lt;P&gt;sample event 1&lt;/P&gt;

&lt;P&gt;{"awsRegion": "xx", "recipientAccountId": "1111111111", "responseElements": null, "eventVersion": "1.05", "userAgent": "aws-sdk-java/1.11.569 Linux/4.14.77-70.59.amzn1.x86_64 Java_HotSpot(TM)_64-Bit_Server_VM/25.202-b08 java/1.8.0_202 groovy/2.4.15 vendor/Oracle_Corporation", "sourceIPAddress": "54.xx.xx.xxx", "eventID": "25ac22f1-510c-461d-9c3f-4ef9010e6754", "requestID": "adaca173-a9d9-11e9-b947-41a6f2f9bb94", "eventName": "&lt;STRONG&gt;GetObject&lt;/STRONG&gt;", "eventType": "AwsApiCall", "requestParameters": {"maxRecords": 100}, "userIdentity": {"accessKeyId": "edgwrhrhrwhwr", "principalId": "AROAJQQOLVHH4PVA7NPZM:redlock", "type": "AssumedRole", "arn": "arn:aws:sts::583542881430:assumed-role/RedLockReadOnlyCyber/redlock", "sessionContext": {"attributes": {"mfaAuthenticated": "false", "creationDate": "2019-07-19T03:45:44Z"}, "sessionIssuer": {"principalId": "AROAJQQOLVHH4PVA7NPZM", "userName": "ddd", "accountId": "ddd", "type": "Role", "arn": "arn:aws:iam::533333333:role/lockr"}}, "accountId": "111111"}, "eventSource": "asss.com", "eventTime": "2019-07-19T03:59:59Z"}&lt;/P&gt;

&lt;P&gt;sample event 2&lt;BR /&gt;
{"awsRegion": "xx", "recipientAccountId": "1111111", "responseElements": null, "eventVersion": "1.05", "userAgent": "aws-sdk-java/1.11.569 Linux/4.14.77-70.59.amzn1.x86_64 Java_HotSpot(TM)_64-Bit_Server_VM/25.202-b08 java/1.8.0_202 groovy/2.4.15 vendor/Oracle_Corporation", "sourceIPAddress": "11.xx.xx.xxxx", "eventID": "25f2b67b-802d-4736-b218-6044ce605ed9", "requestID": "ad7e8c91-a9d9-11e9-b947-41a6f2f9bb94", "eventName": "&lt;STRONG&gt;DescribeAutoScalingGroups&lt;/STRONG&gt;", "eventType": "AwsApiCall", "requestParameters": {"maxRecords": 100}, "userIdentity": {"accessKeyId": "ASXXXXXXXXXXXXXXX", "principalId": "AROAJQQSFGWEGEG:redlock", "type": "AssumedRole", "arn": "arn:aws:sts::123425413513:assumed-role/R/redl", "sessionContext": {"attributes": {"mfaAuthenticated": "false", "creationDate": "2019-07-19T03:45:44Z"}, "sessionIssuer": {"principalId": "AROEGEDG", "userName": "RedLockReadOnlyCyber", "accountId": "12222222", "type": "Role", "arn": "arn:aws:iam::22222222:role/OnlyCyber"}}, "accountId": "23333333"}, "eventSource": "autoscaling.amazonaws.com", "eventTime": "2019-07-19T03:59:59Z"}&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:21:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393334#M70233</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2020-09-30T01:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: filtering logs before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393335#M70234</link>
      <description>&lt;P&gt;On your Indexers (or HFs if you use them), do this:&lt;/P&gt;

&lt;P&gt;In props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[&amp;lt;Your sourcetype here&amp;gt;]
TRANSFORMS-drop_eventname_getobject = drop_eventname_getobject
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[drop_eventname_getobject]
REGEX = ,\s*"eventName":\s*"GetObject",
DEST_KEY=queue
FORMAT=nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jul 2019 23:21:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393335#M70234</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-19T23:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: filtering logs before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393336#M70235</link>
      <description>&lt;P&gt;Thank You @woodcock it worked .What exactly is the syntax that this REGEX you have written uses .You have used \s* which searches for white space character but in the data there is no space for , "eventName": "GetObject",  and you have used comma "," with escaping it in / and finally you have used the "eventName":  and "GetObject" literally the word .&lt;/P&gt;

&lt;P&gt;Is this different kind of syntax that is used .Can you please explain how this works and if we want to add another event name should I just add another line in transforms called REGEX or how to add multiple filters &lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 18:48:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393336#M70235</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2019-07-22T18:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: filtering logs before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393337#M70236</link>
      <description>&lt;P&gt;I like to code for obvious/predictable variants so that, as much as possible, my RegEx is future-proof.  It is true that this means that my RegEx is not quite as efficient as it optimally could be, but I believe that the fault-tolerance is worth it.  Most people will not agree with me.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 13:45:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393337#M70236</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-23T13:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: filtering logs before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393338#M70237</link>
      <description>&lt;P&gt;Thank you .How to add another event name in that REGEX , is there a syntax to add and ca the stanza TRANSFORMS-drop_eventname_getobject = drop_eventname_getobject be used for all multiple source types if they have the same kind of data or do we need to create another one?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:29:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393338#M70237</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2020-09-30T01:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: filtering logs before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393339#M70238</link>
      <description>&lt;P&gt;Yes, any stanza in &lt;CODE&gt;transforms.conf&lt;/CODE&gt; may be referenced multiple times from various stanzas in &lt;CODE&gt;props.conf&lt;/CODE&gt;.  That is the whole idea.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2019 19:09:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/filtering-logs-before-indexing/m-p/393339#M70238</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-27T19:09:37Z</dc:date>
    </item>
  </channel>
</rss>

