<?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 create a props.conf with PCRE in Source? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-props-conf-with-PCRE-in-Source/m-p/546883#M91058</link>
    <description>&lt;P&gt;Stanza names can contain regular expressions, but only if the name also contains "..." or "*".&amp;nbsp; Without one of those it's just plain text.&lt;/P&gt;&lt;P&gt;BTW, files with different formats should be different sourcetypes.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Apr 2021 14:55:21 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-04-06T14:55:21Z</dc:date>
    <item>
      <title>How to create a props.conf with PCRE in Source?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-props-conf-with-PCRE-in-Source/m-p/546872#M91055</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am monitoring dir paths on a syslog server with a UF.&lt;/P&gt;&lt;P&gt;I have a few sources with different formats under the same sourcetype.&lt;/P&gt;&lt;P&gt;I decided to use a regex to differentiate sources and set their unique formats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example I have these two sources...&lt;/P&gt;&lt;P&gt;source 1 = /splunkdata/foobar/serverName/2021-04-06-bar.log&lt;/P&gt;&lt;P&gt;source 2 =/splunkdata/foobar/serverName/2021-04-06-foo-bar.log&lt;/P&gt;&lt;P&gt;I cannot use a "*" wildcard because it is not specific enough,&amp;nbsp; for example *-bar.log will pickup -foo-bar.log too.&lt;/P&gt;&lt;P&gt;The date prefix changes with the log names so I tried this...&lt;/P&gt;&lt;P&gt;source 1 = /splunkdata/foobar/serverName/\d{4}-\d{2}-\d{2}-bar.log&lt;/P&gt;&lt;P&gt;source 2 =/splunkdata/foobar/serverName/\d{4}-\d{2}-\d{2}-foo-bar.log&lt;/P&gt;&lt;P&gt;but no luck... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;IDK if I messed the regex or this is not possible...&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas or examples appreciated.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 13:46:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-props-conf-with-PCRE-in-Source/m-p/546872#M91055</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2021-04-06T13:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a props.conf with PCRE in Source?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-props-conf-with-PCRE-in-Source/m-p/546883#M91058</link>
      <description>&lt;P&gt;Stanza names can contain regular expressions, but only if the name also contains "..." or "*".&amp;nbsp; Without one of those it's just plain text.&lt;/P&gt;&lt;P&gt;BTW, files with different formats should be different sourcetypes.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 14:55:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-props-conf-with-PCRE-in-Source/m-p/546883#M91058</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-04-06T14:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a props.conf with PCRE in Source?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-props-conf-with-PCRE-in-Source/m-p/546886#M91059</link>
      <description>&lt;P&gt;RE: 1 to 1 &amp;gt; sourcetype to format, I agree but the senders did not listen and to rework it is going to take an act of God...&amp;nbsp; so I try to make it work with source stanzas.&lt;/P&gt;&lt;P&gt;RE:&amp;nbsp;&lt;SPAN&gt;Stanza names can contain regular expressions, but only if the name also contains "..." or "*".&amp;nbsp; Without one of those it's just plain text.&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I will see if I can apply one of those...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 15:00:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-props-conf-with-PCRE-in-Source/m-p/546886#M91059</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2021-04-06T15:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a props.conf with PCRE in Source?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-props-conf-with-PCRE-in-Source/m-p/546905#M91064</link>
      <description>&lt;P&gt;Thx Rich!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added a star like this and it works now&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::/splunkdata/foobar/serverName/*\d{4}-\d{2}-\d{2}-foo-bar.log]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is never anything before the data prefix so I don't think this will have any adverse effects.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 18:21:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-props-conf-with-PCRE-in-Source/m-p/546905#M91064</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2021-04-06T18:21:42Z</dc:date>
    </item>
  </channel>
</rss>

