<?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: Negation in Transforms.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184498#M36952</link>
    <description>&lt;P&gt;If my value is something like :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;AAA\s[good\sverygood\swow]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then it should be like &lt;/P&gt;

&lt;P&gt;[^AAA\s[good.verygood.wow]] right ?  please suggest !!&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jan 2015 12:15:43 GMT</pubDate>
    <dc:creator>abhayneilam</dc:creator>
    <dc:date>2015-01-15T12:15:43Z</dc:date>
    <item>
      <title>Negation in Transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184496#M36950</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;
I have a lot in which the below lines are coming&lt;/P&gt;

&lt;P&gt;AAA good&lt;BR /&gt;
BBB good&lt;BR /&gt;
AAA good&lt;BR /&gt;
CCC good&lt;BR /&gt;
DDD bad&lt;BR /&gt;
AAA bad&lt;/P&gt;

&lt;P&gt;I want to nullify the lines which does not have "AAA good" sting. please help me in writing the transforms.conf :&lt;/P&gt;

&lt;P&gt;[AAA_GOOD]&lt;BR /&gt;
REGEX = (?!)AAA\sgood&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;Please help !!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:38:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184496#M36950</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2020-09-28T18:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Negation in Transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184497#M36951</link>
      <description>&lt;P&gt;Hi abhayneilam,&lt;/P&gt;

&lt;P&gt;use this regex and it will only match &lt;CODE&gt;AAA good&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^(?!.*AAA\sgood$).*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2015 12:11:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184497#M36951</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-01-15T12:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Negation in Transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184498#M36952</link>
      <description>&lt;P&gt;If my value is something like :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;AAA\s[good\sverygood\swow]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then it should be like &lt;/P&gt;

&lt;P&gt;[^AAA\s[good.verygood.wow]] right ?  please suggest !!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2015 12:15:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184498#M36952</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2015-01-15T12:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Negation in Transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184499#M36953</link>
      <description>&lt;P&gt;those &lt;CODE&gt;\s&lt;/CODE&gt; literal or regex spaces?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2015 12:26:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184499#M36953</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-01-15T12:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Negation in Transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184500#M36954</link>
      <description>&lt;P&gt;I am giving \s for denoting spaces and also giving \ before .&lt;/P&gt;

&lt;P&gt;I have a string like &lt;/P&gt;

&lt;P&gt;blah blah AAA [good.verygood.wow]  blah blah&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2015 12:29:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184500#M36954</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2015-01-15T12:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Negation in Transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184501#M36955</link>
      <description>&lt;P&gt;How about the docs approach of nulling everything and explicitly keep only the &lt;CODE&gt;AAA [good&lt;/CODE&gt; events like this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;In props.conf:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[AAA_GOOD]
TRANSFORMS-set= setnull,setparsing
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;In transforms.conf:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[setparsing]
REGEX = AAA\s\[good
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tend to setup things the way you can remember what they mean in two years from now.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2015 13:29:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184501#M36955</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-01-15T13:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Negation in Transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184502#M36956</link>
      <description>&lt;P&gt;I have done :&lt;/P&gt;

&lt;P&gt;in props.conf&lt;/P&gt;

&lt;P&gt;[AAA_GOOD]&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
TRANSFORMS-set = setnull,setparsing,add_host,BBB_MORE&lt;/P&gt;

&lt;P&gt;in 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 = AAA\s[good&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = AAA_Index&lt;/P&gt;

&lt;P&gt;[add_host]&lt;BR /&gt;
SOURCE_KEY = MetaData:Host&lt;BR /&gt;
REGEX = ^host::(.*)$&lt;BR /&gt;
FORMAT = HS="$1" $0&lt;BR /&gt;
DEST_KEY = _raw&lt;/P&gt;

&lt;P&gt;[BBB_MORE]&lt;BR /&gt;
REGEX=^(.&lt;EM&gt;?)\s(\d+-\d+-\d+)\s(\d+:\d+:\d+,\d+)\sAAA\s[good]\s[\d+]\s(\w+)\s::\s(.&lt;/EM&gt;)&lt;BR /&gt;
FORMAT=$1 AA=aa BB=bb CC="$2T$3" DD=$4 EE=$5&lt;BR /&gt;
DEST_KEY = _raw&lt;/P&gt;

&lt;P&gt;Please let me know if this is correct.&lt;/P&gt;

&lt;P&gt;I am using my own index name "AAA_Index" instead of  "indexQueue" in props.conf suggested by you. Is it correct ?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:38:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184502#M36956</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2020-09-28T18:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Negation in Transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184503#M36957</link>
      <description>&lt;P&gt;No that's wrong, you cannot specify an index in this case, because the DEST_KEY is queue. If you want to rewrite the index you must use this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DEST_KEY = _MetaData:Index
FORMAT = AAA_Index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And as hint: provide such information in the initial question &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; makes it easier to answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2015 14:12:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Negation-in-Transforms-conf/m-p/184503#M36957</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-01-15T14:12:50Z</dc:date>
    </item>
  </channel>
</rss>

