<?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: DBX inputs - Filter Events to NullQueue in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/DBX-inputs-Filter-Events-to-NullQueue/m-p/387502#M94258</link>
    <description>&lt;P&gt;You're very welcome!  &lt;/P&gt;

&lt;P&gt;You are correct, you'll have to 'escape' the parenthesis you're needing to match for some of the status responses with a backslash character, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=QRS_MSG_STATUS="(\(ACC\)|\(RECEIVE\)|CANCELLED)" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 09 Aug 2018 13:54:42 GMT</pubDate>
    <dc:creator>jblanton_splunk</dc:creator>
    <dc:date>2018-08-09T13:54:42Z</dc:date>
    <item>
      <title>DBX inputs - Filter Events to NullQueue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBX-inputs-Filter-Events-to-NullQueue/m-p/387499#M94255</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a dbx input that runs a stored procedure and spits out results into an index. I would like to add a props.conf and transforms.conf on the Heavy Forwarder to drop events that dont match a particular field value.&lt;/P&gt;

&lt;P&gt;All the fields are automatically extracted since its from the database.&lt;/P&gt;

&lt;P&gt;I would like to add a filter to drop all events except the ones that match ABC_MSG_TYPE= 000 or 111 or 222&lt;/P&gt;

&lt;P&gt;Another filter to drop all events except the ones that match ABC_MSG_STATUS = (COMPLETE) or REPAIR&lt;/P&gt;

&lt;P&gt;I used this in the transforms, but it doesnt work. Could someone please help me with a solution?&lt;/P&gt;

&lt;P&gt;[abc_defghi_jk_discardtype]&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[abc_defghi_jk_keeptype]&lt;BR /&gt;
REGEX=(101|102|103|200|202|203)&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = indexQueue&lt;/P&gt;

&lt;P&gt;Sample Events from Database&lt;/P&gt;

&lt;P&gt;2018-08-07 16:24:46.490, PK_PK_EVENTS="427072", UPDATE_TIME="2018-08-07 16:24:46.4904597", ABC_AMOUNT="4.3000", ABC_BASE_AMOUNT="4.3000", ABC_DEF="0", ABC_CREATE_DATE="2018-08-07 00:00:00.0", ABC_CURRENCY="ABC", ABC_DEPARTMENT="DEF", ABC_DIRECTION="O", ABC_MID="00000000000C000", ABC_MOP="XYZABC", ABC_MSG_STATUS="(COMPLETE)", ABC_MSG_TYPE="000", ABC_NON_STP="1", ABC_ORIG_MOP="FEEDER", ABC_ORIG_MT="000", ABC_ORIG_REFERENCE="ABCDE0000000000", ABC_ORIG_SENDER="ABCBDE3MXXX", ABC_REFERENCE="DEFAB83109613434", ABC_TIME="15:34:42", ABC_UPDTIME="2018-08-07 16:24:39.0", ABC_VALUE_DATE="2018-08-07 00:00:00.0", ABC_SERVICE="ONL", GHI1000_ACC_NO="000000000000000", GHI1000_BBK="ABC DEF , N.A.", GHI1000_BBK_BIC="XXXXXX33XXX", GHI1000_BNF="int jkl mt000", GHI1000_BNF_ID="0&lt;BR /&gt;
2018-08-07 16:24:46.490, PK_PK_EVENTS="427072", UPDATE_TIME="2018-08-07 16:24:46.4904597", ABC_AMOUNT="4.3000", ABC_BASE_AMOUNT="4.3000", ABC_DEF="0", ABC_CREATE_DATE="2018-08-07 00:00:00.0", ABC_CURRENCY="ABC", ABC_DEPARTMENT="DEF", ABC_DIRECTION="O", ABC_MID="00000000000C000", ABC_MOP="XYZABC", ABC_MSG_STATUS="REPAIR", ABC_MSG_TYPE="000", ABC_NON_STP="1", ABC_ORIG_MOP="FEEDER", ABC_ORIG_MT="000", ABC_ORIG_REFERENCE="ABCDE0000000000", ABC_ORIG_SENDER="ABCBDE3MXXX", ABC_REFERENCE="DEFAB83109613434", ABC_TIME="15:34:42", ABC_UPDTIME="2018-08-07 16:24:39.0", ABC_VALUE_DATE="2018-08-07 00:00:00.0", ABC_SERVICE="ONL", GHI1000_ACC_NO="000000000000000", GHI1000_BBK="ABC DEF , N.A.", GHI1000_BBK_BIC="XXXXXX33XXX", GHI1000_BNF="int jkl mt000", GHI1000_BNF_ID="0&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:44:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBX-inputs-Filter-Events-to-NullQueue/m-p/387499#M94255</guid>
      <dc:creator>rijutha</dc:creator>
      <dc:date>2020-09-29T20:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: DBX inputs - Filter Events to NullQueue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBX-inputs-Filter-Events-to-NullQueue/m-p/387500#M94256</link>
      <description>&lt;P&gt;Hello rijutha,&lt;/P&gt;

&lt;P&gt;You'll need to set the quotation marks as part of your Regex capture, and you'll probably want to add the field name as well to prevent it from grabbing other matching strings on accident.&lt;/P&gt;

&lt;P&gt;Try something like:&lt;BR /&gt;
[abc_defghi_jk_keeptype]&lt;BR /&gt;
REGEX=ABC_MSG_TYPE="(101|102|103|200|202|203)"&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = indexQueue&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:49:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBX-inputs-Filter-Events-to-NullQueue/m-p/387500#M94256</guid>
      <dc:creator>jblanton_splunk</dc:creator>
      <dc:date>2020-09-29T20:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: DBX inputs - Filter Events to NullQueue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBX-inputs-Filter-Events-to-NullQueue/m-p/387501#M94257</link>
      <description>&lt;P&gt;Thanks a ton! That worked for MSG_TYPE. But does not work for MSG_STATUS, am thinking its because of the paranthesis for some values. Would you know a solution?&lt;/P&gt;

&lt;P&gt;[abc_defghi_jklmnop_discardstatus]&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[abc_defghi_jklmnop_keepstatus]&lt;BR /&gt;
REGEX=QRS_MSG_STATUS="((ACC)|(RECEIVE)|(SPAWN)|APPROVED|ABWAITQ|CANCELED|COMPLETE|EXPEX|DEWAITQ|HELD|TRWAITQ|TRP|PAYSET|REJECTED|RELEASE|REPAIR|RTGSSYSQ|SCHEDULE|SECEX|ANIDX|VERIFY|WAITBULK)"&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = indexQueue&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:49:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBX-inputs-Filter-Events-to-NullQueue/m-p/387501#M94257</guid>
      <dc:creator>rijutha</dc:creator>
      <dc:date>2020-09-29T20:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: DBX inputs - Filter Events to NullQueue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBX-inputs-Filter-Events-to-NullQueue/m-p/387502#M94258</link>
      <description>&lt;P&gt;You're very welcome!  &lt;/P&gt;

&lt;P&gt;You are correct, you'll have to 'escape' the parenthesis you're needing to match for some of the status responses with a backslash character, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=QRS_MSG_STATUS="(\(ACC\)|\(RECEIVE\)|CANCELLED)" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 13:54:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBX-inputs-Filter-Events-to-NullQueue/m-p/387502#M94258</guid>
      <dc:creator>jblanton_splunk</dc:creator>
      <dc:date>2018-08-09T13:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: DBX inputs - Filter Events to NullQueue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBX-inputs-Filter-Events-to-NullQueue/m-p/387503#M94259</link>
      <description>&lt;P&gt;Hi jblanton,&lt;/P&gt;

&lt;P&gt;I tried escaping the paranthesis as you mentioned. It is dropping all events into the nullqueue and not picking up the events that are in scope or valid. :(.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 02:14:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBX-inputs-Filter-Events-to-NullQueue/m-p/387503#M94259</guid>
      <dc:creator>rijutha</dc:creator>
      <dc:date>2018-08-13T02:14:04Z</dc:date>
    </item>
  </channel>
</rss>

