<?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: What is incorrect with my regular expression in my inputs.conf file? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/What-is-incorrect-with-my-regular-expression-in-my-inputs-conf/m-p/279426#M53498</link>
    <description>&lt;P&gt;Thank you for your response; it worked out great.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2017 20:47:11 GMT</pubDate>
    <dc:creator>twmjim</dc:creator>
    <dc:date>2017-02-06T20:47:11Z</dc:date>
    <item>
      <title>What is incorrect with my regular expression in my inputs.conf file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-incorrect-with-my-regular-expression-in-my-inputs-conf/m-p/279423#M53495</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I'm trying to pull in a logfile that is named different on each workstation, using a regular expression in the inputs.conf file.     &lt;/P&gt;

&lt;P&gt;The filename is written to each workstation as follows:&lt;/P&gt;

&lt;P&gt;filename format: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`    `*logfile*     (static text)
`    `*computer#*      -&amp;gt; three digit number, with leading zeros
`    `*.txt*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;for example:.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`    `Computer#1 - logfile001.txt
`    `Computer#2 - logfile002.txt
`    `...
`    `Computer #20 - logfile020.txt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;etc..&lt;/P&gt;

&lt;P&gt;I attempted to create a regular expression to distribute out to each workstation so that Splunk would read in whatever the filename that is located on the terminal, but the file fails to load.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`    `**[monitor://C:\logs\logfile0(01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20).txt]**
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I cannot use a wildcard in the monitor line, such as &lt;CODE&gt;*logfile**.txt*&lt;/CODE&gt; because files are rolled over each day with a same filename with the addition of a timestamp (&lt;EM&gt;i.e.  logfile01_2017-02-05.txt&lt;/EM&gt;) and I don't want to re-read the archived data into the index.&lt;/P&gt;

&lt;P&gt;Does anyone have a suggestion on what is incorrect with the expression that would cause the file not to be loaded?    &lt;/P&gt;

&lt;P&gt;Any advice would be appreciated.  Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 17:50:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-incorrect-with-my-regular-expression-in-my-inputs-conf/m-p/279423#M53495</guid>
      <dc:creator>twmjim</dc:creator>
      <dc:date>2017-02-06T17:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: What is incorrect with my regular expression in my inputs.conf file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-incorrect-with-my-regular-expression-in-my-inputs-conf/m-p/279424#M53496</link>
      <description>&lt;P&gt;I would try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\logs\logfile*]
whitelist = .*\.txt$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This monitors the directory for files starting with "logfile", but only whitelists files that end with .txt (anchored to end of file name). That should preclude any files that have been rotated by adding a timestamp from being picked up.&lt;BR /&gt;
Adjust the whitelist RegEx if you need to ensure the three-digit number is there (add \d{3})&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 19:18:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-incorrect-with-my-regular-expression-in-my-inputs-conf/m-p/279424#M53496</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-02-06T19:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: What is incorrect with my regular expression in my inputs.conf file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-incorrect-with-my-regular-expression-in-my-inputs-conf/m-p/279425#M53497</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\logs\logfile*.txt]
index=foo
sourcetype=bar
whitelist=logfile\d+\.txt$
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Feb 2017 19:20:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-incorrect-with-my-regular-expression-in-my-inputs-conf/m-p/279425#M53497</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-06T19:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: What is incorrect with my regular expression in my inputs.conf file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-is-incorrect-with-my-regular-expression-in-my-inputs-conf/m-p/279426#M53498</link>
      <description>&lt;P&gt;Thank you for your response; it worked out great.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 20:47:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-is-incorrect-with-my-regular-expression-in-my-inputs-conf/m-p/279426#M53498</guid>
      <dc:creator>twmjim</dc:creator>
      <dc:date>2017-02-06T20:47:11Z</dc:date>
    </item>
  </channel>
</rss>

