<?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: I have large and long Regex with tens of thousand characters (approx 21k) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303216#M91224</link>
    <description>&lt;P&gt;Just one... one question.... why do you have a regex with 21k characters? &lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2017 12:58:19 GMT</pubDate>
    <dc:creator>horsefez</dc:creator>
    <dc:date>2017-02-14T12:58:19Z</dc:date>
    <item>
      <title>I have large and long Regex with tens of thousand characters (approx 21k)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303215#M91223</link>
      <description>&lt;P&gt;I have Regex with tens of thousand characters (approx 21k),&lt;BR /&gt;
Its for event filtering, with config model like below:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Props.conf&lt;/STRONG&gt;&lt;BR /&gt;
[source::udp:514]&lt;BR /&gt;
TRANSFORMS-filter&amp;amp;route_syslog = setnull, ip_interface, ip_xxx&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Transforms.conf&lt;/STRONG&gt;&lt;BR /&gt;
[ip_interface]&lt;BR /&gt;
REGEX = &lt;STRONG&gt;(around 21k characters)&lt;/STRONG&gt;&lt;BR /&gt;
DEST_KEY = _SYSLOG_ROUTING&lt;BR /&gt;
FORMAT = TargetGroup&lt;/P&gt;

&lt;P&gt;[ip_xxx]&lt;BR /&gt;
REGEX = &lt;STRONG&gt;(around hundreds characters)&lt;/STRONG&gt;&lt;BR /&gt;
DEST_KEY = _SYSLOG_ROUTING&lt;BR /&gt;
FORMAT = TargetGroup&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;I found the filtering is not working as supposed to, some other data is routed also,&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;is there any problem with limit?&lt;BR /&gt;
Where can I adjust the limit?&lt;BR /&gt;
May be I have to breakdown some of the transform, make it into few filter group (ip_interface1, ip_interface2, ...)?&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;In short: I was asking if there is limit on regex formula, may be like maximum total characters allowed,&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:53:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303215#M91223</guid>
      <dc:creator>deodion</dc:creator>
      <dc:date>2020-09-29T12:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: I have large and long Regex with tens of thousand characters (approx 21k)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303216#M91224</link>
      <description>&lt;P&gt;Just one... one question.... why do you have a regex with 21k characters? &lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 12:58:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303216#M91224</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2017-02-14T12:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: I have large and long Regex with tens of thousand characters (approx 21k)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303217#M91225</link>
      <description>&lt;P&gt;the regex is based on specific ip address and interface name&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 13:06:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303217#M91225</guid>
      <dc:creator>deodion</dc:creator>
      <dc:date>2017-02-14T13:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: I have large and long Regex with tens of thousand characters (approx 21k)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303218#M91226</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Same question as @pyro_wood - that seems like a very, very long regex.&lt;/P&gt;

&lt;P&gt;Could you add some background about what you're trying to achieve?&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;You have a UDP/514 input, so it sounds like you have devices sending Syslog to Splunk.&lt;/LI&gt;
&lt;LI&gt;What is it that you want to happen next?&lt;/LI&gt;
&lt;LI&gt;Are you then wanting to get Splunk to route these Syslog message to different onward systems (Splunk and/or something else)?&lt;/LI&gt;
&lt;LI&gt;Or are you trying to filter some messages out so that they don't get indexed?&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;If you could update the question with more about your scenario and requirements, I'm sure folks here will be able to suggest some alternative approaches.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 13:57:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303218#M91226</guid>
      <dc:creator>gvmorley</dc:creator>
      <dc:date>2017-02-14T13:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: I have large and long Regex with tens of thousand characters (approx 21k)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303219#M91227</link>
      <description>&lt;P&gt;&lt;STRONG&gt;What is it that you want to happen next?&lt;/STRONG&gt;&lt;BR /&gt;
filter and route filtered events to targetgroup&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Are you then wanting to get Splunk to route these Syslog message to different onward systems (Splunk and/or something else)?&lt;/STRONG&gt;&lt;BR /&gt;
yes&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Or are you trying to filter some messages out so that they don't get indexed?&lt;/STRONG&gt;&lt;BR /&gt;
Trying to filter selected events and route it,&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;If you could update the question with more about your scenario and requirements, I'm sure folks here will be able to suggest some alternative approaches.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I want to filter and route selected events, the rules is (specific IP AND specific interface name) only. Thats it. And yes the list is large and long,&lt;/P&gt;

&lt;P&gt;There is no generic consolidated pattern in the filtering rule,&lt;BR /&gt;
&lt;STRONG&gt;the regex formula is this:&lt;/STRONG&gt; (A1.&lt;EM&gt;A2)|(B1.*B2)|(C1.*C2)|............&lt;/EM&gt;*&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:53:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303219#M91227</guid>
      <dc:creator>deodion</dc:creator>
      <dc:date>2020-09-29T12:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: I have large and long Regex with tens of thousand characters (approx 21k)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303220#M91228</link>
      <description>&lt;P&gt;I suggest that you install some version of syslog to do this filtering and data segregation for you. Both syslog-ng and rsyslog have the ability to filter. If you have syslog doing the initial data capture from UDP:514, then you can also set it up to split the data into multiple files. Here is a snippet from the syslog-ng documentation.&lt;/P&gt;

&lt;P&gt;"The destination filename may include macros which get expanded when the message is written, thus a simple file() driver may create several files: for example, syslog-ng OSE can store the messages of client hosts in a separate file for each host. "&lt;/P&gt;

&lt;P&gt;If syslog-ng is writing to a set of files, then you get 2 advantages: first, syslog gives you buffering between the network port and Splunk. Second, in Splunk you can more easily specify the routing (or the host name, etc) on a file-by-file basis in inputs.conf and/or props.conf. This is much more efficient than processing the inputs event-by-event in transforms.conf. And you won't need a 21K regular expression.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 05:44:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303220#M91228</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2017-02-16T05:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: I have large and long Regex with tens of thousand characters (approx 21k)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303221#M91229</link>
      <description>&lt;P&gt;I was asking if there is limit on regex formula, may be like maximum total characters allowed,&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 08:11:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-large-and-long-Regex-with-tens-of-thousand-characters/m-p/303221#M91229</guid>
      <dc:creator>deodion</dc:creator>
      <dc:date>2017-02-16T08:11:50Z</dc:date>
    </item>
  </channel>
</rss>

