<?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: Handling text .dat files : How can I override splunks system default props.conf configuration for just a single app? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28700#M4926</link>
    <description>&lt;P&gt;upvote for PYRO&lt;/P&gt;</description>
    <pubDate>Fri, 28 Dec 2012 19:49:19 GMT</pubDate>
    <dc:creator>piebob</dc:creator>
    <dc:date>2012-12-28T19:49:19Z</dc:date>
    <item>
      <title>Handling text .dat files : How can I override splunks system default props.conf configuration for just a single app?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28694#M4920</link>
      <description>&lt;P&gt;I am having an issue where file names like this "220120808.dat.gz" are not being processed.&lt;/P&gt;

&lt;P&gt;After much investigation (manually uncompressing/renaming etc) it turns out that the system props file is identifying the file as a "known_source" source type because of the .dat file extention after the uncompression process.&lt;/P&gt;

&lt;P&gt;Seems to be exactly the same issue as per this older thread -&amp;gt; ( &lt;A href="http://splunk-base.splunk.com/answers/31415/splunk-not-indexing-modified-files"&gt;http://splunk-base.splunk.com/answers/31415/splunk-not-indexing-modified-files&lt;/A&gt; )&lt;/P&gt;

&lt;P&gt;My issue is that in my local applications inputs.conf I am defining the sourcetype for all files monitored in a specific directory. The files are being read from that directory so why isn't the sourcetype stanza applied also? At a guess im thinking that the gzip overrides this setting. Yet doesn't apply the app level sourcetype definition afterwards.&lt;/P&gt;

&lt;P&gt;So my question is. Why isn't splunk honoring the system&amp;gt;default&amp;gt;local&amp;gt;app&amp;gt;default&amp;gt;local hierachy for source typing?&lt;/P&gt;

&lt;P&gt;The suggestion in the older thread is to put in a new source type definition that redefines the dat file for this app.&lt;/P&gt;

&lt;P&gt;ie. ../etc/apps/my_app/local/props.conf (below modified from the original system/default/props.conf file)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::....(dat)]
sourcetype = my_sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've tried this and it doesn't work and still retains the default source type of "known_binary" and thus is not indexed.&lt;/P&gt;

&lt;P&gt;My only other way i thought was to just copy that source section and put it in a local system props.conf. My issue then would be that im redefining this source type for ALL .dat files and not just a single application.&lt;/P&gt;

&lt;P&gt;More info can be provided.&lt;BR /&gt;
splunk 4.3.3.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2012 05:59:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28694#M4920</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2012-08-08T05:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Handling text .dat files : How can I override splunks system default props.conf configuration for just a single app?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28695#M4921</link>
      <description>&lt;P&gt;Try moving the sourcetype = my_sourcetype into the /apps/my_app/local/inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///path/to/*.dat.gz]
whitelist = \d{1,}\.dat\.gz
sourcetype = my_sourcetype
index = my_index
etc...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:13:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28695#M4921</guid>
      <dc:creator>pshumate</dc:creator>
      <dc:date>2020-09-28T12:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Handling text .dat files : How can I override splunks system default props.conf configuration for just a single app?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28696#M4922</link>
      <description>&lt;P&gt;That whitelist didn't help.&lt;/P&gt;

&lt;P&gt;I put this into the app/local/props.conf.&lt;/P&gt;

&lt;P&gt;[source::/path/file(.dat|.dat.gz)]&lt;BR /&gt;
sourcetype = blah.&lt;/P&gt;

&lt;P&gt;Then running ./splunk test sourcetype /path/file.dat.gz  shows that it correctly sets the sourcetype to "blah". However the data still doesn't show up inside the index if the file is a .gz. I AM however able to get the .dat file in successfully if I manually uncompress it.&lt;/P&gt;

&lt;P&gt;Trying a few other things as I really need to be able to process the logs using only splunk and not an external script to uncompress the files.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2012 01:40:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28696#M4922</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2012-08-09T01:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Handling text .dat files : How can I override splunks system default props.conf configuration for just a single app?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28697#M4923</link>
      <description>&lt;P&gt;I re-read your previous answer of "put sourcetype in input.conf". I already had that also (still not working).&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2012 04:56:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28697#M4923</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2012-08-09T04:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Handling text .dat files : How can I override splunks system default props.conf configuration for just a single app?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28698#M4924</link>
      <description>&lt;P&gt;will you post a snip of the uncompressed .dat and the lines from $SPLUNK/var/log/splunk/splunk.log from where it tries to read the dat.gz?&lt;BR /&gt;
I added the whitelist as a safety net just in case there was a ton of data in that dir that would regex to *.dat.gz. This being a thing I have learned the hard way.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2012 14:06:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28698#M4924</guid>
      <dc:creator>pshumate</dc:creator>
      <dc:date>2012-08-09T14:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Handling text .dat files : How can I override splunks system default props.conf configuration for just a single app?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28699#M4925</link>
      <description>&lt;P&gt;Solution here (only took 2 months &lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt; ) : &lt;A href="http://splunk-base.splunk.com/answers/60643/archiveprocessor-bypassing-normal-systemlocalpropsconf-processing-for-dat-files-inside-archives-434"&gt;http://splunk-base.splunk.com/answers/60643/archiveprocessor-bypassing-normal-systemlocalpropsconf-processing-for-dat-files-inside-archives-434&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;As described in the other post putting the sourcetype definition in the local app didn't override the local system setting when the file is inside an archive.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2012 05:33:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28699#M4925</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2012-10-16T05:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Handling text .dat files : How can I override splunks system default props.conf configuration for just a single app?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28700#M4926</link>
      <description>&lt;P&gt;upvote for PYRO&lt;/P&gt;</description>
      <pubDate>Fri, 28 Dec 2012 19:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Handling-text-dat-files-How-can-I-override-splunks-system/m-p/28700#M4926</guid>
      <dc:creator>piebob</dc:creator>
      <dc:date>2012-12-28T19:49:19Z</dc:date>
    </item>
  </channel>
</rss>

