<?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 forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357686#M65326</link>
    <description>&lt;P&gt;Still logs are coming as a whole without keys.&lt;/P&gt;

&lt;P&gt;I have done these changes in props.conf and transforms.conf. Regex is correct as I have checked that.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Aug 2017 07:32:54 GMT</pubDate>
    <dc:creator>anupam491</dc:creator>
    <dc:date>2017-08-07T07:32:54Z</dc:date>
    <item>
      <title>How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357682#M65322</link>
      <description>&lt;P&gt;I have a Splunk Forwarder setup already on my host.&lt;/P&gt;

&lt;P&gt;I have certain files on folder (/tom/mike/). File names are starting with Back*.&lt;/P&gt;

&lt;P&gt;The content of file may in one or multiple line. There are multiple fixed position values in each line with no header.&lt;/P&gt;

&lt;P&gt;Content (Example: Consider "-" as one space)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Tom---516-----RTYUI------45678
Mik---345-----XYXFF------56789
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need splunk logs for each line.&lt;/P&gt;

&lt;P&gt;Like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Key1= Tom   Key2=516   Key3= RTYUI  Key4= 45678

Key1= Mike  Key2= 345  Key3= XYXFF  Key4= 56789
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I know inputs.conf changes would be like below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///tom/mike/Back*]
index=myIndex
blacklist=\.(gz|zip|bkz|arch|etc)$
sourcetype = BackFileData
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please suggest changes which can be done in props.conf. Please keep in mind that delimiter is fixed for each value in line but its not same (like 2 spaces)  for all column values. There are no headers as well in these files.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Aug 2017 00:29:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357682#M65322</guid>
      <dc:creator>anupam491</dc:creator>
      <dc:date>2017-08-06T00:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357683#M65323</link>
      <description>&lt;P&gt;As long as the spacing is consistent, just use traditional RegEx means like this in transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[BackFileData_main_fields]
#Tom---516-----RTYUI------45678
REGEX = ^(\w{3})\s{3}(\d{3})\s{5}(\w{5})\s{6}(\d+)$
FORMAT = Key1::$1 Key2::$2 Key3::$3 Key4::$4
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 06 Aug 2017 12:35:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357683#M65323</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-08-06T12:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357684#M65324</link>
      <description>&lt;P&gt;I assume that   _main_fields   is a keyword here.&lt;/P&gt;

&lt;P&gt;So BackFileData_main_fields  means sourcetype_main_fields ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:16:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357684#M65324</guid>
      <dc:creator>anupam491</dc:creator>
      <dc:date>2020-09-29T15:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357685#M65325</link>
      <description>&lt;P&gt;You'd need this in props.conf to enable the answer by &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt; &lt;/P&gt;

&lt;P&gt;[BackFileData]&lt;BR /&gt;
TRANSFORMS-backfiledata=BackFileData_main_fields&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:15:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357685#M65325</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T15:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357686#M65326</link>
      <description>&lt;P&gt;Still logs are coming as a whole without keys.&lt;/P&gt;

&lt;P&gt;I have done these changes in props.conf and transforms.conf. Regex is correct as I have checked that.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2017 07:32:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357686#M65326</guid>
      <dc:creator>anupam491</dc:creator>
      <dc:date>2017-08-07T07:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357687#M65327</link>
      <description>&lt;P&gt;I think some more changes are required. Right now both lines are coming together without keys.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2017 07:36:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357687#M65327</guid>
      <dc:creator>anupam491</dc:creator>
      <dc:date>2017-08-07T07:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357688#M65328</link>
      <description>&lt;P&gt;Here's how I would do it:&lt;/P&gt;

&lt;P&gt;On the search heads, create an app with a props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [BackFileData]
 EXTRACT-fields=^(?&amp;lt;Key1&amp;gt;\S+)\s+(?&amp;lt;Key2&amp;gt;\d+)\s+(?&amp;lt;Key3&amp;gt;\S+)\s+(?&amp;lt;Key4&amp;gt;\d+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then I'd make the permissions on the app "global" if I wanted the extraction to work for anyone in any app, "app level" if I only wanted it to work inside the app, or "private" if I only wanted myself to have the extraction (in any app).  &lt;/P&gt;

&lt;P&gt;Doing it this way will apply the schema at search time which is the best practice versus transforming the data and indexing the fields.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2017 12:28:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357688#M65328</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-07T12:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357689#M65329</link>
      <description>&lt;P&gt;How to make the permissions on the app "global"? I tried without any permission setup and got the same result.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2017 20:13:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357689#M65329</guid>
      <dc:creator>anupam491</dc:creator>
      <dc:date>2017-08-07T20:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357690#M65330</link>
      <description>&lt;P&gt;You go to the little cog / gear next to apps on the home screen (app manager) and you click permissions next to the app.  Don't forget to restart Splunk too.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2017 21:38:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357690#M65330</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-07T21:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357691#M65331</link>
      <description>&lt;P&gt;I have checked and found this is as "app only" and I think that is correct.&lt;/P&gt;

&lt;P&gt;Sorry to bother you but these steps didn't work.  Can you please explain steps considering my initial questions. &lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2017 22:19:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357691#M65331</guid>
      <dc:creator>anupam491</dc:creator>
      <dc:date>2017-08-07T22:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357692#M65332</link>
      <description>&lt;P&gt;If you change it to all apps that makes it global.  Otherwise you will have to be in the app you created when you search for the extractions to work.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2017 22:30:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357692#M65332</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-07T22:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357693#M65333</link>
      <description>&lt;P&gt;You need to deploy to all indexers, restart all Splunk instances there, and then test by ONLY looking at post-restart events (old events will stay broken).&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2017 22:36:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357693#M65333</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-08-07T22:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357694#M65334</link>
      <description>&lt;P&gt;I am trying to go by first suggestion.&lt;BR /&gt;
Directory&lt;/P&gt;

&lt;P&gt;~/splunk/heavyforwarder/etc/apps/Splunk_TA_nix/default&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;[BackFileData]&lt;BR /&gt;
TRANSFORMS-backfiledata=BackFileData_main_fields&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;P&gt;[BackFileData_main_fields]&lt;BR /&gt;
REGEX = ^(\w{3})\s{3}(\d{3})\s{5}(\w{5})\s{6}(\d+)$&lt;BR /&gt;
FORMAT = Key1::$1 Key2::$2 Key3::$3 Key4::$4&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;P&gt;[monitor:///tom/mike/Back*]&lt;BR /&gt;
index=cs_it&lt;BR /&gt;
blacklist=.(gz|zip|bkz|arch|etc)$&lt;BR /&gt;
sourcetype = BackFileData&lt;/P&gt;

&lt;P&gt;I am still getting logs like below.&lt;/P&gt;

&lt;P&gt;8/9/17&lt;BR /&gt;
3:58:38.000 PM  Tom   516     RTYUI      45678&lt;/P&gt;

&lt;P&gt;Can someone please tell that what is wrong in transforms.conf/props.conf ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:18:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357694#M65334</guid>
      <dc:creator>anupam491</dc:creator>
      <dc:date>2020-09-29T15:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357695#M65335</link>
      <description>&lt;P&gt;Instead of the \s{x} where x is a number, try \s+.  Same for \w and \d.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 23:20:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357695#M65335</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-09T23:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357696#M65336</link>
      <description>&lt;P&gt;BTW, your logs will remain the same... it's the fields Key1-Key4 that you're creating here.&lt;/P&gt;

&lt;P&gt;Are you trying to transform your data instead?&lt;/P&gt;

&lt;P&gt;If so you will need SEDCMD in props.conf instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-keys=s/(\S+)\s+(\d+)\s+(\S+)\s+(\d+)/Key1=\1 Key2=\2 Key3=\3 Key4=\4/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You won't need the transforms.&lt;/P&gt;

&lt;P&gt;You will have to index new data to see the props applied, and the props need to be on the forwarder.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 23:26:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357696#M65336</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-09T23:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357697#M65337</link>
      <description>&lt;P&gt;Thanks. Now keys are coming.&lt;/P&gt;

&lt;P&gt;It is coming like&lt;/P&gt;

&lt;P&gt;8/9/17&lt;BR /&gt;
5:11:34.000 PM&lt;BR /&gt;&lt;BR /&gt;
Key1=Tom Key2=516 Key3=RTYUI Key4=45678&lt;BR /&gt;
Key1=Mik Key2=516 Key3=RTYUI Key4=45678&lt;/P&gt;

&lt;P&gt;But I want to forward each line separately like:&lt;/P&gt;

&lt;P&gt;8/9/17&lt;BR /&gt;
5:11:34.000 PM&lt;BR /&gt;&lt;BR /&gt;
Key1=Tom Key2=516 Key3=RTYUI Key4=45678&lt;/P&gt;

&lt;P&gt;8/9/17&lt;BR /&gt;
5:11:34.000 PM&lt;BR /&gt;&lt;BR /&gt;
Key1=Mik Key2=516 Key3=RTYUI Key4=45678&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 00:14:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357697#M65337</guid>
      <dc:creator>anupam491</dc:creator>
      <dc:date>2017-08-10T00:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to forward logs with Splunk Universal Forwarder for the files with no header and logs should be in form of key/value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357698#M65338</link>
      <description>&lt;P&gt;Add this to the props&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; SHOULD_LINEMERGE=false
  LINE_BREAKER=([\n\r]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Aug 2017 01:11:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-forward-logs-with-Splunk-Universal-Forwarder-for-the/m-p/357698#M65338</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-10T01:11:07Z</dc:date>
    </item>
  </channel>
</rss>

