<?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 to write these Props &amp;amp; transforms configuration? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/597365#M104291</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245266"&gt;@mounikad&lt;/a&gt;&amp;nbsp;- your regex would be something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;REGEX = \"status\":\s*\"200\"

REGEX = \"rule_result\":\s*\"pass\"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!! Karma/upvote would be appreciated.&lt;/P&gt;</description>
    <pubDate>Wed, 11 May 2022 11:35:04 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2022-05-11T11:35:04Z</dc:date>
    <item>
      <title>How to write these Props &amp; transforms configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/595558#M104019</link>
      <description>&lt;P&gt;We have to filter the data which has Result=pass, status=200 and send the other logs to Splunk. we have received the logs to splunk before adding props.conf and transforms.conf. we have the following configuration in props.conf &amp;amp; transforms.conf.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;/opt/splunk/etc/apps/TA-AlibabaCloudSLS/default/&lt;/SPAN&gt;transforms.conf&lt;/P&gt;
&lt;P&gt;[setnull]&lt;BR /&gt;REGEX = .&lt;BR /&gt;DEST_KEY = queue&lt;BR /&gt;FORMAT = nullQueue&lt;/P&gt;
&lt;P&gt;[setparsing]&lt;BR /&gt;REGEX = result\=200&lt;BR /&gt;DEST_KEY = queue&lt;BR /&gt;FORMAT = indexQueue&lt;/P&gt;
&lt;P&gt;[cloudnull]&lt;BR /&gt;REGEX = .&lt;BR /&gt;DEST_KEY = queue&lt;BR /&gt;FORMAT = nullQueue&lt;/P&gt;
&lt;P&gt;[cloudparsing]&lt;BR /&gt;REGEX = result\=pass&lt;BR /&gt;DEST_KEY = queue&lt;BR /&gt;FORMAT = indexQueue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;/opt/splunk/etc/apps/TA-AlibabaCloudSLS/default/&lt;/SPAN&gt;props.conf&lt;/P&gt;
&lt;P&gt;[alibaba:cloudfirewall]&lt;BR /&gt;TRANSFORMS-set= cloudnull,cloudparsing&lt;/P&gt;
&lt;P&gt;[alibaba:waf]&lt;BR /&gt;TRANSFORMS-set= setnull,setparsing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But we are not receiving any logs to splunk for this although there are logs in alibaba cloud. Below is the inputs.conf file&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;/opt/splunk/etc/apps/TA-AlibabaCloudSLS/local/inputs.conf&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;[sls_datainput://Alibaba_Cloud_Firewall]&lt;BR /&gt;event_retry_times = 0&lt;BR /&gt;event_source = alibaba:cloudfirewall&lt;BR /&gt;event_sourcetype = alibaba:cloudfirewall&lt;BR /&gt;hec_timeout = 120&lt;BR /&gt;index = *****&lt;BR /&gt;interval = 300&lt;BR /&gt;protocol = private&lt;BR /&gt;sls_accesskey = *****&lt;BR /&gt;sls_cg = ******&lt;BR /&gt;sls_cursor_start_time = end&lt;BR /&gt;sls_data_fetch_interval = 1&lt;BR /&gt;sls_endpoint = *******&lt;BR /&gt;sls_heartbeat_interval = 60&lt;BR /&gt;sls_logstore = *****&lt;BR /&gt;sls_max_fetch_log_group_size = 1000&lt;BR /&gt;sls_project = *******&lt;BR /&gt;unfolded_fields = {"actiontrail_audit_event": ["event"], "actiontrail_event": ["event"] }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[sls_datainput://Alibaba_waf]&lt;BR /&gt;event_retry_times = 0&lt;BR /&gt;event_source = alibaba:waf&lt;BR /&gt;event_sourcetype = alibaba:waf&lt;BR /&gt;hec_timeout = 120&lt;BR /&gt;index = *****&lt;BR /&gt;interval = 300&lt;BR /&gt;protocol = private&lt;BR /&gt;sls_accesskey = ******&lt;BR /&gt;sls_cg = *******&lt;BR /&gt;sls_cursor_start_time = end&lt;BR /&gt;sls_data_fetch_interval = 1&lt;BR /&gt;sls_endpoint = ****&lt;BR /&gt;sls_heartbeat_interval = 60&lt;BR /&gt;sls_logstore = *****&lt;BR /&gt;sls_max_fetch_log_group_size = 1000&lt;BR /&gt;sls_project = ****&lt;BR /&gt;unfolded_fields = {"actiontrail_audit_event": ["event"], "actiontrail_event": ["event"] }&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 15:58:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/595558#M104019</guid>
      <dc:creator>mounikad</dc:creator>
      <dc:date>2022-04-27T15:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to write these Props &amp; transforms configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/596061#M104088</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245266"&gt;@mounikad&lt;/a&gt;&amp;nbsp;- Try the below configuration based on your description:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245266"&gt;@mounikad&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;We have to filter the data which has Result=pass, status=200 and send the other logs to Splunk.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[setparsing]
REGEX = result\=200
DEST_KEY = queue
FORMAT = nullQueue

[cloudparsing]
REGEX = result\=pass
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;props.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[alibaba:cloudfirewall]
TRANSFORMS-filter_logs = cloudparsing

[alibaba:waf]
TRANSFORMS-filter_logs = setparsing&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!! Upvote/Karma would be appreciated!!!&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 09:04:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/596061#M104088</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-05-01T09:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to write these Props &amp; transforms configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/597087#M104230</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Still we are getting the&amp;nbsp;&lt;SPAN&gt;Result=pass, status=200 logs. we don't need these logs to be indexed.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 06:42:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/597087#M104230</guid>
      <dc:creator>mounikad</dc:creator>
      <dc:date>2022-05-10T06:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write these Props &amp; transforms configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/597137#M104236</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245266"&gt;@mounikad&lt;/a&gt;&amp;nbsp;- There was a confusion between description and regex in the initial question.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;Still we are getting the&amp;nbsp;&lt;SPAN&gt;Result=pass, status=200 logs. we don't need these logs to be indexed.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;VS&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;[setparsing]&lt;BR /&gt;REGEX = result\=200&lt;BR /&gt;DEST_KEY = queue&lt;BR /&gt;FORMAT = indexQueue&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;You need to write in the regex exactly what you are seeing in the _raw events. the extracted fields will not work in the TRANSFORMS.&lt;/P&gt;&lt;P&gt;So here the assumption is that your _raw event has "&lt;STRONG&gt;result=200&lt;/STRONG&gt;" somewhere in the _raw text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!!&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 10:46:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/597137#M104236</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-05-10T10:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to write these Props &amp; transforms configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/597364#M104290</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we have&amp;nbsp;"status": "200" &amp;amp;&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;rule_result&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;SPAN class=""&gt;pass&lt;/SPAN&gt;&lt;SPAN&gt;" in _raw text. I have used&amp;nbsp;REGEX= status: 200 &amp;amp;&amp;nbsp;REGEX = rule_result: pass. Still we are getting the logs. can you please let me know the REGEX we need to use for&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"status": "200"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"&lt;SPAN class=""&gt;rule_result&lt;/SPAN&gt;"&lt;SPAN class=""&gt;:&lt;/SPAN&gt; "&lt;SPAN class=""&gt;pass&lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 11:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/597364#M104290</guid>
      <dc:creator>mounikad</dc:creator>
      <dc:date>2022-05-11T11:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to write these Props &amp; transforms configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/597365#M104291</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245266"&gt;@mounikad&lt;/a&gt;&amp;nbsp;- your regex would be something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;REGEX = \"status\":\s*\"200\"

REGEX = \"rule_result\":\s*\"pass\"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!! Karma/upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 11:35:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/597365#M104291</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-05-11T11:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write these Props &amp; transforms configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/597367#M104293</link>
      <description>&lt;P&gt;Yes, you have to put the strings literarily (or regexes matching the raw event contents). At this point Splunk has no awareness of fields of any kind (apart from index-time fields).&lt;/P&gt;&lt;P&gt;So you'd have to put in something like&lt;/P&gt;&lt;PRE&gt;REGEX = "status"\s*:\s*"200"&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE&gt;REGEX = "rule_result"\s*:\s*"pass"&lt;/PRE&gt;&lt;P&gt;(those spaces are thrown in just to be sure that it works even if the literal contents change a bit while still being a proper json).&lt;/P&gt;&lt;P&gt;But from what I'm seeing you're trying to do the opposite to what you're saying.&lt;/P&gt;&lt;P&gt;If you do set the nullQueue as the default and only put those specific events in the indexQueue, you have just that - you're indexing _only_ those event instead of all events _except_ those.&lt;/P&gt;&lt;P&gt;So you'd rather want something similar to what &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt; showed before.&lt;/P&gt;&lt;P&gt;Don't do the default nullQueue transform. Just do your transforms.conf like this:&lt;/P&gt;&lt;PRE&gt;[setparsing]&lt;BR /&gt;REGEX = "status"\s*:\s*"200"&lt;BR /&gt;DEST_KEY = queue&lt;BR /&gt;FORMAT = nullQueue&lt;BR /&gt;&lt;BR /&gt;[cloudparsing]&lt;BR /&gt;REGEX = "rule_result"\s*:\s*"pass"&lt;BR /&gt;DEST_KEY = queue&lt;BR /&gt;FORMAT = nullQueue&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And the corresponding props.conf as shown above and you're good to go.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 11:38:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-write-these-Props-amp-transforms-configuration/m-p/597367#M104293</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-11T11:38:00Z</dc:date>
    </item>
  </channel>
</rss>

