<?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 set INGEST in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596886#M104196</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think there's a typo because it's a mobile phone There is no problem with the regular expression, and turning the indexer off also does not solve it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Props.conf&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[source::/var/log/data*.LOG]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DATETIME_CONFIG&amp;nbsp;=&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SHOULD_LINEMERGE&amp;nbsp;=&amp;nbsp;false&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LINE_BREAKER&amp;nbsp;=&amp;nbsp;([\r\n]+)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NO_BINARY_CHECK&amp;nbsp;=&amp;nbsp;true&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;disabled&amp;nbsp;=&amp;nbsp;false&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TRANSFORMS=get_date,set_time&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;transfroms.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[get_date]&lt;BR /&gt;SOURCE_KEY=MetaData:Source&lt;BR /&gt;REGEX=\/var\/log\/date_\d+_(?P&amp;lt;date&amp;gt;\d+)\.LOG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[set_time]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;INGEST_EVAL=&amp;nbsp;_time&amp;nbsp;=&amp;nbsp;strptime(date,"%Y%m%d")&amp;nbsp;+&amp;nbsp;random()&amp;nbsp;%1000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And if there is a problem with the time range, is there any other way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 May 2022 07:08:53 GMT</pubDate>
    <dc:creator>noott211</dc:creator>
    <dc:date>2022-05-09T07:08:53Z</dc:date>
    <item>
      <title>How to set INGEST</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596869#M104193</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no time field in my log and I tried to get time from the source file name&lt;/P&gt;&lt;P&gt;I tried the settings below&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;myfile /var/log/data_01_20220507&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;/var/log/data_02_20220506&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;transforms.conf&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;[get_date]&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;SOURCE_KEY=MetaData:Source&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;REGEX=/var/log/data_01_\d+_(?P&amp;lt;date&amp;gt;\d+)\.LOG&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;[set_time]&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;INGEST_EVAL=&amp;nbsp;_time&amp;nbsp;=&amp;nbsp;strptime(date,"%Y%m%d")&amp;nbsp;+&amp;nbsp;random()&amp;nbsp;%1000&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;props.conf&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;[mysourcetype]&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;DATETIME_CONFIG&amp;nbsp;=&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;SHOULD_LINEMERGE&amp;nbsp;=&amp;nbsp;false&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;LINE_BREAKER&amp;nbsp;=&amp;nbsp;([\r\n]+)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;NO_BINARY_CHECK&amp;nbsp;=&amp;nbsp;true&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;disabled&amp;nbsp;=&amp;nbsp;false&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;TRANSFORMS-time_set=&amp;nbsp;get_date&amp;nbsp;,&amp;nbsp;set_time&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;However, it is timed in real time and the settings do not take effect.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;The universal forwarder sends data to the indexer, and I put this setting in the indexer What's the problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 03:53:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596869#M104193</guid>
      <dc:creator>noott211</dc:creator>
      <dc:date>2022-05-09T03:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to set INGEST</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596884#M104195</link>
      <description>&lt;P&gt;First question - did you restart the indexer?&lt;/P&gt;&lt;P&gt;Second question - are you sure about the regex? The filename examples do not seem to match it.&lt;/P&gt;&lt;P&gt;Oh, and if you time your events at "date +/- random", you'll get your events scattered radomly around midnight that day (some before midnight, some after). You'll lose the order of events.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 06:49:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596884#M104195</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-09T06:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to set INGEST</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596886#M104196</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think there's a typo because it's a mobile phone There is no problem with the regular expression, and turning the indexer off also does not solve it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Props.conf&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[source::/var/log/data*.LOG]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DATETIME_CONFIG&amp;nbsp;=&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SHOULD_LINEMERGE&amp;nbsp;=&amp;nbsp;false&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LINE_BREAKER&amp;nbsp;=&amp;nbsp;([\r\n]+)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NO_BINARY_CHECK&amp;nbsp;=&amp;nbsp;true&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;disabled&amp;nbsp;=&amp;nbsp;false&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TRANSFORMS=get_date,set_time&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;transfroms.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[get_date]&lt;BR /&gt;SOURCE_KEY=MetaData:Source&lt;BR /&gt;REGEX=\/var\/log\/date_\d+_(?P&amp;lt;date&amp;gt;\d+)\.LOG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[set_time]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;INGEST_EVAL=&amp;nbsp;_time&amp;nbsp;=&amp;nbsp;strptime(date,"%Y%m%d")&amp;nbsp;+&amp;nbsp;random()&amp;nbsp;%1000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And if there is a problem with the time range, is there any other way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 07:08:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596886#M104196</guid>
      <dc:creator>noott211</dc:creator>
      <dc:date>2022-05-09T07:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to set INGEST</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596890#M104197</link>
      <description>&lt;P&gt;I've never tried putting TRANSFORMS alone as such into props.conf. It's always TRANSFORMS-something&lt;/P&gt;&lt;P&gt;So the relevant line to call your transforms should be something like&lt;/P&gt;&lt;PRE&gt;TRANSFORMS-datemanipulation=get_date,set_time&lt;/PRE&gt;&lt;P&gt;You can also try to do it in one go as shown in &lt;A href="https://conf.splunk.com/files/2020/slides/PLA1154C.pdf" target="_blank"&gt;https://conf.splunk.com/files/2020/slides/PLA1154C.pdf&lt;/A&gt; (slide 29) so you don't get another indexed field that you don't need.&lt;/P&gt;&lt;P&gt;And I would drop this random() altogether.&amp;nbsp; Unfortunately, as you don't have any reliable time information you have to stick to just putting all your events in one timestamp.&lt;/P&gt;&lt;P&gt;Sorry, my initial remark about random() pushing some events to the day before was obviously wrong. You're only adding time to the midnight timestamp so the time will always be in the "next" day. But randomizing timestamp will mangle your order of events.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 07:19:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596890#M104197</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-09T07:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to set INGEST</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596894#M104198</link>
      <description>&lt;P&gt;All methods were used but failed. The log time is still generated as the current time...&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 07:48:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596894#M104198</guid>
      <dc:creator>noott211</dc:creator>
      <dc:date>2022-05-09T07:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to set INGEST</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596895#M104199</link>
      <description>&lt;P&gt;Check with btool if your resulting configuration looks as it should.&lt;/P&gt;&lt;P&gt;For quick debug you can add a transform adding some constant value to your event to check if it's being called at all.&lt;/P&gt;&lt;P&gt;Oh, and I see you have MetaData instead of Metadata (yes, it's case sensitive)&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 08:06:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596895#M104199</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-09T08:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to set INGEST</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596907#M104200</link>
      <description>&lt;P&gt;There is no problem when checking Btool Is it a matter of setting MetaData?&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 09:10:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-INGEST/m-p/596907#M104200</guid>
      <dc:creator>noott211</dc:creator>
      <dc:date>2022-05-09T09:10:19Z</dc:date>
    </item>
  </channel>
</rss>

