<?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: transforms.conf INGEST_EVAL cannot get current time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/transforms-conf-INGEST-EVAL-cannot-get-current-time/m-p/508198#M142013</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN&gt;richgalloway,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found out using time() instead of now() can do the trick.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#props.conf
[mysourcetype]
TRANSFORMS-gettime = get-time-only&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#transforms.conf
[get-time-only]
INGEST_EVAL = current_date=time()&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 08 Jul 2020 22:27:51 GMT</pubDate>
    <dc:creator>season88481</dc:creator>
    <dc:date>2020-07-08T22:27:51Z</dc:date>
    <item>
      <title>transforms.conf INGEST_EVAL cannot get current time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transforms-conf-INGEST-EVAL-cannot-get-current-time/m-p/507953#M141974</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to add a field for the current OS time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my props.conf and transforms.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#props.conf
[mysourcetype]
TRANSFORMS-getdate = get-current-date&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;#transforms.conf
[get-current-date]
INGEST_EVAL = current_date=now()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I have this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ERROR regexExtractionProcessor - Error compiling INGEST_EVAL expression for get-current-date: Bad function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it a bug?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 13:16:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transforms-conf-INGEST-EVAL-cannot-get-current-time/m-p/507953#M141974</guid>
      <dc:creator>season88481</dc:creator>
      <dc:date>2020-07-08T13:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: transforms.conf INGEST_EVAL cannot get current time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transforms-conf-INGEST-EVAL-cannot-get-current-time/m-p/508086#M142000</link>
      <description>I suspect it is not a bug. Submit feedback at &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.4/Data/IngestEval" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.4/Data/IngestEval&lt;/A&gt; requesting a list of allowed functions in INGEST_EVAL.&lt;BR /&gt;As a workaround, consider using the existing _index_time field in place of current_date.</description>
      <pubDate>Wed, 08 Jul 2020 13:29:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transforms-conf-INGEST-EVAL-cannot-get-current-time/m-p/508086#M142000</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-08T13:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: transforms.conf INGEST_EVAL cannot get current time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transforms-conf-INGEST-EVAL-cannot-get-current-time/m-p/508198#M142013</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;SPAN&gt;richgalloway,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found out using time() instead of now() can do the trick.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#props.conf
[mysourcetype]
TRANSFORMS-gettime = get-time-only&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#transforms.conf
[get-time-only]
INGEST_EVAL = current_date=time()&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 08 Jul 2020 22:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transforms-conf-INGEST-EVAL-cannot-get-current-time/m-p/508198#M142013</guid>
      <dc:creator>season88481</dc:creator>
      <dc:date>2020-07-08T22:27:51Z</dc:date>
    </item>
  </channel>
</rss>

