<?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: ingest events with a specific string - remove the rest in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/ingest-events-with-a-specific-string-remove-the-rest/m-p/532500#M89516</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194518"&gt;@schose&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Dec 2020 16:51:03 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-12-09T16:51:03Z</dc:date>
    <item>
      <title>ingest events with a specific string - remove the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-events-with-a-specific-string-remove-the-rest/m-p/532497#M89513</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm trying to ingest (multiline) events with the string "public_ip" and remove the rest&amp;nbsp;&lt;/P&gt;&lt;P&gt;props.conf:&lt;/P&gt;&lt;PRE&gt;[public_ips]
TRANSFORMS-removeallnonsense = remove_unneeded&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;transforms.conf&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;[remove_unneeded]
REGEX = (?m)^((?!public_ip).)*$
DEST_KEY = queue
FORMAT = nullQueue&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;When i now try to ingest Data using HEC:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;curl -k http://localhost:8088/services/collector -H 'Authorization: Splunk 4f40e8ab-99a6-479f-ba13-7352feb11111' \&lt;BR /&gt;-d '{"sourcetype": "public_ips", "event":"foobar"}'&lt;/PRE&gt;&lt;P&gt;is not indexed - fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;curl -k http://localhost:8088/services/collector -H 'Authorization: Splunk 4f40e8ab-99a6-479f-ba13-7352feb11111' \&lt;BR /&gt;-d '{"sourcetype": "public_ips", "event":"foobar public_ip: 1.2.3.4 foobar1"}'&lt;/PRE&gt;&lt;P&gt;this is indexed - fine&lt;/P&gt;&lt;P&gt;when running:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;curl -k http://localhost:8088/services/collector -H 'Authorization: Splunk 4f40e8ab-99a6-479f-ba13-7352feb11111' \&lt;BR /&gt;-d '{"sourcetype": "public_ips", "event":"foobar public_ip: 1.2.3.4 foobar\nline2"}'&lt;/PRE&gt;&lt;P&gt;This is not indexed - not fine.&amp;nbsp; It seems i have a regex multiline issue i do not see..&lt;/P&gt;&lt;P&gt;Thanks for your help in advance,&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 16:16:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-events-with-a-specific-string-remove-the-rest/m-p/532497#M89513</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2020-12-09T16:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: ingest events with a specific string - remove the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-events-with-a-specific-string-remove-the-rest/m-p/532498#M89514</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194518"&gt;@schose&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;could you share a sample of your logs? in this way I can analyze your regex.&lt;/P&gt;&lt;P&gt;Anyway, try a different approach (as described at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.0/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues:" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.0/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues)&lt;/A&gt;&amp;nbsp;"take public_ip events and discrd the rest" instead of "discard all not public_ip events"; something like this:&lt;/P&gt;&lt;P&gt;In props.conf:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[public_ips]
TRANSFORMS-set= setnull,setparsing&lt;/LI-CODE&gt;&lt;P&gt;In transforms.conf:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[setparsing]
REGEX = public_ip
DEST_KEY = queue
FORMAT = indexQueue&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 16:35:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-events-with-a-specific-string-remove-the-rest/m-p/532498#M89514</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-12-09T16:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: ingest events with a specific string - remove the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-events-with-a-specific-string-remove-the-rest/m-p/532499#M89515</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I tried to share some demo data within the curl commands. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Anyway... the example you posted worked for me, awesome!&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 16:44:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-events-with-a-specific-string-remove-the-rest/m-p/532499#M89515</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2020-12-09T16:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: ingest events with a specific string - remove the rest</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-events-with-a-specific-string-remove-the-rest/m-p/532500#M89516</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194518"&gt;@schose&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 16:51:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-events-with-a-specific-string-remove-the-rest/m-p/532500#M89516</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-12-09T16:51:03Z</dc:date>
    </item>
  </channel>
</rss>

