<?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 change _time data in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433049#M68628</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;
Thanks for your response.&lt;BR /&gt;
We are absolutely new to Splunk, please help...&lt;/P&gt;

&lt;P&gt;We have a 5 node splunk cluster - 3 indexers, 1 master and 1 search head. We have ingested the data from meinberg clocks as illustrated above by my colleague. The data is exactly as represented above, nothing is masked.&lt;/P&gt;

&lt;P&gt;The data is updated at source once a day and splunk is picking up the _time value as the splunk ingestion time. We want to change this to pick the time in the last column. &lt;BR /&gt;
Do we need to delete the existing data in Splunk for this change. &lt;/P&gt;

&lt;P&gt;The inputs.conf for universal forwarder is :&lt;/P&gt;

&lt;P&gt;[monitor://\\ldn\dfs01\PTPLogs\DomainTime\MeinbergClocks]&lt;BR /&gt;
host_regex = Clocks\(\w+).mrs&lt;BR /&gt;
disabled = false&lt;BR /&gt;
sourcetype = clocktimesynclogs&lt;BR /&gt;
index = indexclocktimesynclogs&lt;/P&gt;

&lt;P&gt;Should we add your suggested config to the end of the inputs.conf:&lt;BR /&gt;
 DATETIME_CONFIG = &lt;BR /&gt;
1. NO_BINARY_CHECK = true&lt;BR /&gt;
2. SHOULD_LINEMERGE = false&lt;BR /&gt;
3. TIME_FORMAT = %Y%m%d/%H:%M:%S/%Z&lt;BR /&gt;
4. TIME_PREFIX = ([^\s]+\s+){9}&lt;BR /&gt;
5. category = Custom&lt;BR /&gt;
6. pulldown_type = true&lt;/P&gt;

&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Nelton&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 22:24:50 GMT</pubDate>
    <dc:creator>neltonk</dc:creator>
    <dc:date>2020-09-29T22:24:50Z</dc:date>
    <item>
      <title>How to change _time data</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433046#M68625</link>
      <description>&lt;P&gt;We inject Meinberg clock data into splunk one a day . We have observered that _time is filled when data is injected &lt;BR /&gt;
Can we change this to use one field in data file &lt;/P&gt;

&lt;H1&gt;Day  Sec              GPS              PPS             IRIG              NTP              PTP              FRQ              STR&lt;/H1&gt;

&lt;P&gt;58461 00007     -0.000000004      0.000008975              ???              ???              ???              ???              ??? 20181209/00:00:07/UTC&lt;BR /&gt;
58461 00020      0.000000000      0.000008870              ???              ???              ???              ???              ??? 20181209/00:00:20/UTC&lt;BR /&gt;
58461 00033     -0.000000001      0.000009869              ???              ???              ???              ???              ??? 20181209/00:00:33/UTC&lt;/P&gt;

&lt;P&gt;We want _time to be populated with STR data but injection data ..&lt;/P&gt;

&lt;P&gt;Please advise how we can do this &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;vivek&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 16:57:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433046#M68625</guid>
      <dc:creator>vivekg72</dc:creator>
      <dc:date>2018-12-10T16:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to change _time data</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433047#M68626</link>
      <description>&lt;P&gt;Would suggest reading this&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.2.1/Data/HowSplunkextractstimestamps"&gt;http://docs.splunk.com/Documentation/Splunk/7.2.1/Data/HowSplunkextractstimestamps&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 17:07:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433047#M68626</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-12-10T17:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to change _time data</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433048#M68627</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/63132"&gt;@vivekg72&lt;/a&gt;!&lt;/P&gt;

&lt;P&gt;Have a look at the page which &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt; posted.&lt;/P&gt;

&lt;P&gt;Also, have a look at &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.2.1/Data/Configuretimestamprecognition" target="_blank"&gt;Configure timestamp recognition&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Basically, you need to create a new sourcetype which tells Splunk how to extract the timestamp to build the _time field. When defining timestamp recognition, you need to take special care of &lt;STRONG&gt;TIME_PREFIX&lt;/STRONG&gt; and &lt;STRONG&gt;TIME_FORMAT&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;I presume you masked your data with "???" so my response might not be 100% accurate. Having the timestamp at the end of the event with no fixed string in front of it is a little tricky. (Ideally, the timestamp is at the very beginning of the event.) However, check this out:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[meinberg]
DATETIME_CONFIG = 
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
TIME_FORMAT = %Y%m%d/%H:%M:%S/%Z
TIME_PREFIX = ([^\s]+\s+){9}
category = Custom
pulldown_type = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/259605-meinberg.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;You will need to increase the Lookahead if your events are longer than your example events.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:19:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433048#M68627</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2020-09-29T22:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to change _time data</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433049#M68628</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
Thanks for your response.&lt;BR /&gt;
We are absolutely new to Splunk, please help...&lt;/P&gt;

&lt;P&gt;We have a 5 node splunk cluster - 3 indexers, 1 master and 1 search head. We have ingested the data from meinberg clocks as illustrated above by my colleague. The data is exactly as represented above, nothing is masked.&lt;/P&gt;

&lt;P&gt;The data is updated at source once a day and splunk is picking up the _time value as the splunk ingestion time. We want to change this to pick the time in the last column. &lt;BR /&gt;
Do we need to delete the existing data in Splunk for this change. &lt;/P&gt;

&lt;P&gt;The inputs.conf for universal forwarder is :&lt;/P&gt;

&lt;P&gt;[monitor://\\ldn\dfs01\PTPLogs\DomainTime\MeinbergClocks]&lt;BR /&gt;
host_regex = Clocks\(\w+).mrs&lt;BR /&gt;
disabled = false&lt;BR /&gt;
sourcetype = clocktimesynclogs&lt;BR /&gt;
index = indexclocktimesynclogs&lt;/P&gt;

&lt;P&gt;Should we add your suggested config to the end of the inputs.conf:&lt;BR /&gt;
 DATETIME_CONFIG = &lt;BR /&gt;
1. NO_BINARY_CHECK = true&lt;BR /&gt;
2. SHOULD_LINEMERGE = false&lt;BR /&gt;
3. TIME_FORMAT = %Y%m%d/%H:%M:%S/%Z&lt;BR /&gt;
4. TIME_PREFIX = ([^\s]+\s+){9}&lt;BR /&gt;
5. category = Custom&lt;BR /&gt;
6. pulldown_type = true&lt;/P&gt;

&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Nelton&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:24:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433049#M68628</guid>
      <dc:creator>neltonk</dc:creator>
      <dc:date>2020-09-29T22:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to change _time data</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433050#M68629</link>
      <description>&lt;P&gt;Hello Nelton,&lt;BR /&gt;
You should add my suggested config (don't forget the first line/the stanza [meinberg] or similar) to props.conf on your Universal Forwarder as well as on your Heavy Forwarder/Indexer (whatever system comes after the Universal Forwarder).&lt;/P&gt;

&lt;P&gt;You also need to edit the "sourcetype" line in your inputs.conf on your Universal Forwarder to match the stanza in props.conf:&lt;BR /&gt;
sourcetype = meinberg&lt;/P&gt;

&lt;P&gt;Don't forget to restart Splunk after making changes to configuration files.&lt;BR /&gt;
You don't need to delete the existing data in Splunk. However, the existing data will keep the wrong timestamp.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 13:12:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433050#M68629</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2018-12-17T13:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to change _time data</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433051#M68630</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have tried to apply this in non-prod before applying in PROD. I have few questions... Please help.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6240iA06A0EEC5184B059/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;As shown in the image, the rule is being applied to the first row with the headers, how to ignore the rule for the first row?&lt;/LI&gt;
&lt;LI&gt;The date is being picked up however, it is adding 1 hour to the time. Now sure what is wrong here...&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Nelton&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 17:11:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433051#M68630</guid>
      <dc:creator>neltonk</dc:creator>
      <dc:date>2018-12-17T17:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to change _time data</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433052#M68631</link>
      <description>&lt;P&gt;Could you please help...&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 10:39:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433052#M68631</guid>
      <dc:creator>neltonk</dc:creator>
      <dc:date>2018-12-18T10:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to change _time data</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433053#M68632</link>
      <description>&lt;P&gt;Hello Nelton,&lt;/P&gt;

&lt;P&gt;Use the "Add comment" function when replying instead of posting a new answer.&lt;/P&gt;

&lt;P&gt;Regarding your second question: Your logs contain a UTC timestamp. Splunk Web will display your local time zone. I guess for you that is GMT+1. (You can view/edit your user's time zone if you click on your username at the top and then click on "Preferences".)&lt;/P&gt;

&lt;P&gt;Regarding your first question: Splunk can automatically extract the header and create the corresponding fields. See &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.2.1/Data/Extractfieldsfromfileswithstructureddata" target="_blank"&gt;Extract fields from files with structured data&lt;/A&gt;. However, that only works for file-based inputs and for the "Upload" function in Splunk Web. Add the "FIELD_DELIMITER" and "HEADER_FIELD_DELIMITER" configuration:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://ibb.co/3rjcBLV" target="_blank"&gt;https://ibb.co/3rjcBLV&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Splunk complains that the header contains 9 fields whereas the other lines contain 10 fields.&lt;/P&gt;

&lt;P&gt;You could also configure field extractions at search time instead at index time like shown here.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:25:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-change-time-data/m-p/433053#M68632</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2020-09-29T22:25:29Z</dc:date>
    </item>
  </channel>
</rss>

