<?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: Hunk timestamp problem in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239080#M73639</link>
    <description>&lt;P&gt;Great Ledion, now I got what you said, going to check that and report later!&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2016 16:49:23 GMT</pubDate>
    <dc:creator>felipetavares</dc:creator>
    <dc:date>2016-05-05T16:49:23Z</dc:date>
    <item>
      <title>Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239076#M73635</link>
      <description>&lt;P&gt;Hello there guys!&lt;/P&gt;

&lt;P&gt;We have here a Yarn Hadoop cluster running fine and also we have Hunk 6.4.0 running, which connects to our haddop cluster and can make queries on it.&lt;BR /&gt;
If I do a query like this: &lt;STRONG&gt;index=fs_vindex | dedup computerName | table computerName&lt;/STRONG&gt; on &lt;STRONG&gt;All Time&lt;/STRONG&gt;, I get a list with all servers that are sending logs to the location specified for this vindex.&lt;BR /&gt;
But, if I change the time picker to a specified amount of time (today or whatever), the query won't work and, worse, I don't see any errors at the logs.&lt;/P&gt;

&lt;P&gt;I've searched a lot, but I still can't find a solution, hope anyone can help me.&lt;BR /&gt;
Here comes the configuration files:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;indexes.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[fs_vindex]
vix.description = Index virtual do FS
vix.input.1.et.format = yyyyMMddHH
vix.input.1.et.regex = /storage/data/BR_SIEM_success.EventLogFS/hourly/(\d{4})/(\d{2})/(\d{2})/(\d{2})/.*
vix.input.1.lt.format = yyyyMMddHH
vix.input.1.lt.regex = /storage/data/BR_SIEM_success.EventLogFS/hourly/(\d{4})/(\d{2})/(\d{2})/(\d{2})/.*
vix.input.1.path = /storage/data/BR_SIEM_success.EventLogFS/hourly/...
vix.provider = hadoop_producao
vix.provider.description = Ambiente
vix.input.1.lt.offset = 3600

[provider:hadoop_producao]
vix.command.arg.3 = $SPLUNK_HOME/bin/jars/SplunkMR-hy2.jar
vix.description = Ambiente
vix.env.HADOOP_HOME = /usr/lib/hadoop
vix.env.JAVA_HOME = /opt/java
vix.family = hadoop
vix.fs.default.name = hdfs://srvmasterofpuppets:8020
vix.mapreduce.framework.name = yarn
vix.output.buckets.max.network.bandwidth = 0
vix.splunk.home.hdfs = /user/hunk
vix.hadoop.security.authorization = 0
vix.splunk.impersonation = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 20:30:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239076#M73635</guid>
      <dc:creator>felipetavares</dc:creator>
      <dc:date>2016-05-04T20:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239077#M73636</link>
      <description>&lt;P&gt;Are the events time stamped correctly? ie does the event timestamp correspond to the path of the file where the event is found? &lt;/P&gt;

&lt;P&gt;Unrelated, I'd recommend using the following  more efficient search to get a table of computerName (and a count of events)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=fs_vindex | stats count BY computerName 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 May 2016 20:37:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239077#M73636</guid>
      <dc:creator>Ledion_Bitincka</dc:creator>
      <dc:date>2016-05-04T20:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239078#M73637</link>
      <description>&lt;P&gt;Hello there @Ledion! Yes, there are events and the timestamp is correct, I can see them when I run the All Time query and when I navigate with the "Explore Data".&lt;BR /&gt;
I didn't use the stats, because I don't need the count of event, I only need the name of each server, is it really faster? Is it because it's only one operation and the way I'm doing I'm using two?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 20:50:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239078#M73637</guid>
      <dc:creator>felipetavares</dc:creator>
      <dc:date>2016-05-04T20:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239079#M73638</link>
      <description>&lt;P&gt;I assume your don't see &lt;STRONG&gt;any&lt;/STRONG&gt; events if you run a search over a given time period (hour, day, week etc) - correct? If so this is generally an indication that the time extracted from the events is different from the one extracted from the path. Is there a timezone difference between the path and Splunk's or your user's setting in Splunk?  &lt;/P&gt;

&lt;P&gt;I highly recommend that you do specify the timezone of the extracted time from the path&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;vix.input.[N].et/lt.timezone - the timezone in which to interpret the extracted time. E.g. "America/Los_Angeles" or "GMT-8:00", 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;see &lt;A href="http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html"&gt;http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html&lt;/A&gt; for more info on the supported strings&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 22:00:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239079#M73638</guid>
      <dc:creator>Ledion_Bitincka</dc:creator>
      <dc:date>2016-05-04T22:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239080#M73639</link>
      <description>&lt;P&gt;Great Ledion, now I got what you said, going to check that and report later!&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 16:49:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239080#M73639</guid>
      <dc:creator>felipetavares</dc:creator>
      <dc:date>2016-05-05T16:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239081#M73640</link>
      <description>&lt;P&gt;Hello @Ledion.&lt;BR /&gt;
I've played with the timestamp adjustment, but without success.&lt;BR /&gt;
Our data is on BRT Timezone (GMT -3), but our HDFS Timezone is GMT, so I can see that our data has it's directory, on the same Timezone that the event's hour, but the files written on HDFS have +3 hours (GMT).&lt;BR /&gt;
So, at the Virtual Index configuration, I've used the GMT, GMT +3, GMT -3 and some others, but none of them seemed to work for us.&lt;BR /&gt;
Maybe I'm doing the time extraction on a wrong way?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;vix.input.1.et.format = yyyyMMddHH
vix.input.1.et.regex = /storage/data/BR_SIEM_success.EventLogFS/hourly/(\d{4})/(\d{2})/(\d{2})/(\d{2})/.*
vix.input.1.lt.format = yyyyMMddHH
vix.input.1.lt.regex = /storage/data/BR_SIEM_success.EventLogFS/hourly/(\d{4})/(\d{2})/(\d{2})/(\d{2})/.*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I think that I'm missing something, any advices will help us a lot!&lt;BR /&gt;
Ahh, this is what I get on "Explore Data":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;storage/data/BR_SIEM_success.EventLogFS/hourly/2016/05/09/15/
Type    Name    Owner   Size    Permissions Last Modified Time 
BR_SIEM_success.0.0.66.73582308.1462816800000.avro  hdfs    56.32 KB    rw-r--r--   May 9, 2016 6:01:36 PM
BR_SIEM_success.10.10.21.76501680.1462816800000.avro    hdfs    19.82 KB    rw-r--r--   May 9, 2016 6:01:49 PM
BR_SIEM_success.11.11.42.75316419.1462816800000.avro    hdfs    37.62 KB    rw-r--r--   May 9, 2016 6:01:59 PM
BR_SIEM_success.2.2.23.80555652.1462816800000.avro  hdfs    20.89 KB    rw-r--r--   May 9, 2016 6:02:36 PM
BR_SIEM_success.3.3.92.80099611.1462816800000.avro  hdfs    77.57 KB    rw-r--r--   May 9, 2016 6:01:49 PM
BR_SIEM_success.5.5.23.78514890.1462816800000.avro  hdfs    20.66 KB    rw-r--r--   May 9, 2016 6:01:54 PM
BR_SIEM_success.7.7.21.78649173.1462816800000.avro  hdfs    19.22 KB    rw-r--r--   May 9, 2016 6:01:59 PM
BR_SIEM_success.8.8.44.74151067.1462816800000.avro  hdfs    38.13 KB    rw-r--r--   May 9, 2016 6:01:54 PM
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 May 2016 18:27:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239081#M73640</guid>
      <dc:creator>felipetavares</dc:creator>
      <dc:date>2016-05-09T18:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239082#M73641</link>
      <description>&lt;P&gt;I notice that your directory name indicates that it contains files for hour=15, which I believe means 3pm-4pm, and your files have a last-modified date in the range 6pm-7pm, which would be hour=18. This might be because the process creating the files is using a different timezone than the process which moves the files to HDFS. Do the events in those files also have timestamps with hour=15 or hour=18? If the latter, then you need to either change the timezone, as Ledion suggested, or else use an earliest time offset of 10800 (i.e. 3 hours) and a latest time offset of 14400 (i.e. 4 hours).  &lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 22:56:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239082#M73641</guid>
      <dc:creator>kschon_splunk</dc:creator>
      <dc:date>2016-05-09T22:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239083#M73642</link>
      <description>&lt;P&gt;Hello there @kschon! The events have hour=15. As I said, I tried to use timezones GMT -3, GMT and even GMT +3, but it won't work. About the time offsets, it is used to consider the difference between modification time and event time?&lt;BR /&gt;
Maybe you could help me?&lt;BR /&gt;
I can't find more detailed information about this at the knowledge base.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 17:19:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239083#M73642</guid>
      <dc:creator>felipetavares</dc:creator>
      <dc:date>2016-05-10T17:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239084#M73643</link>
      <description>&lt;P&gt;Last mod time usually is not used for anything. I was just making an inference about the events in those files.&lt;/P&gt;

&lt;P&gt;For each file in a virtual index, the "earliest time" and "latest time" should correspond to the timestamps of the first and last events in the file, respectively. They are used to determined whether Hunk needs to read that file. If the file presumably has no events in the time range of the query, then we might as well skip it. But the actual timestamp of each event in that file is determined according to the event's contents and the event's sourcetype. (&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/HowSplunkextractstimestamps"&gt;The file's last modification time might be used if no other information is available&lt;/A&gt;.) An event whose timestamp is outside the time-range of the search will still be rejected, no matter what "et" and "lt" its file has. So if "et" and "lt" are not configured correctly, then Hunk will incorrectly reject the files containing events it wants, and correctly reject events from the files it reads. &lt;/P&gt;

&lt;P&gt;An offset determines the difference between a time read from a file's path, and the correct value. In your example stanza at the top, you use the same value for "vix.input.1.et.regex" as "vix.input.1.lt.regex", and the same value for "vix.input.1.et.format" as "vix.input.1.lt.format". Without an offset, et would be the same as lt for each file. Adding "vix.input.1.lt.offset = 3600" means that the presumed latest time for the file will be one hour after the earliest time. In my example, I just added 3 hours to both.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 01:51:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239084#M73643</guid>
      <dc:creator>kschon_splunk</dc:creator>
      <dc:date>2016-05-11T01:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239085#M73644</link>
      <description>&lt;P&gt;Hello again @kschon!&lt;/P&gt;

&lt;P&gt;Well, I've got what you mean about the offset, well, my files will hold only some minutes, as inside each dir we have 1 hour (as the configuration that follows below).&lt;BR /&gt;
Even though, I've configured the et.offset to 3h and the the lt.offset to 4h, also used GMT and GMT-3 timezones, but it still doesn't work. So I played with time for the offset entrances, but still haven't got any improvement.&lt;/P&gt;

&lt;P&gt;I also saw here something that I believe that was an error: I had 5~ virtual indexes, and all of them had the same "vix.xxx.&lt;STRONG&gt;1&lt;/STRONG&gt;.xxx.xxx", so I thought that this should be causing the problems. I've excluded all the virtual indexes, except for below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[wintel_fs_index]
vix.description = Index virtual do FS
vix.input.1.et.format = yyyyMMddHH
vix.input.1.et.regex = /storage/data/BR_SIEM_success.EventLogFS/hourly/(\d{4})/(\d{2})/(\d{2})/(\d{2})/.*
vix.input.1.et.offset = 3600
vix.input.1.et.timezone = America/Sao_Paulo
vix.input.1.lt.format = yyyyMMddHH
vix.input.1.lt.regex = /openbus/data/BR_SIEM_success.EventLogFS/hourly/(\d{4})/(\d{2})/(\d{2})/(\d{2})/.*
vix.input.1.lt.offset = 3600
vix.input.1.path = /openbus/data/BR_SIEM_success.EventLogFS/hourly/...
vix.input.1.lt.timezone = America/Sao_Paulo
vix.provider = hadoop_producao
vix.provider.description = Ambiente
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But, I'm still not being able to generate outputs from time ranged queries, &lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 17:53:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239085#M73644</guid>
      <dc:creator>felipetavares</dc:creator>
      <dc:date>2016-05-11T17:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239086#M73645</link>
      <description>&lt;P&gt;Hello there @kschon and @Ledion (and for anyone else that should come to this problem)&lt;/P&gt;

&lt;P&gt;I've finally solved the problem: the reason that Hunk wasn't able to parse the &lt;STRONG&gt;timestamp&lt;/STRONG&gt; field is because it had the &lt;EM&gt;string type&lt;/EM&gt;. I've changed it to &lt;EM&gt;long&lt;/EM&gt; now and as a trick of magic, Hunk started to &lt;EM&gt;understand&lt;/EM&gt; and parse it.&lt;BR /&gt;
Hope I can help anyone else facing this problem.&lt;/P&gt;

&lt;P&gt;Best Regards!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 19:03:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239086#M73645</guid>
      <dc:creator>felipetavares</dc:creator>
      <dc:date>2016-06-02T19:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239087#M73646</link>
      <description>&lt;P&gt;I'm glad that it's working! For my own information, how did you change the field type? Is it a change in the sourcetype?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 20:27:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239087#M73646</guid>
      <dc:creator>kschon_splunk</dc:creator>
      <dc:date>2016-06-06T20:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239088#M73647</link>
      <description>&lt;P&gt;I've been having timestamp problems too and see my timestamps are strings as well. Please do share how you worked around this issue exactly. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 20:42:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239088#M73647</guid>
      <dc:creator>burwell</dc:creator>
      <dc:date>2016-06-06T20:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239089#M73648</link>
      <description>&lt;P&gt;Hello there @kschon!&lt;BR /&gt;
No, I've changed it "before" hunk, on my data source, that is a json generated by our Big Data bus, so I only changed the field schema from string to long &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 22:22:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239089#M73648</guid>
      <dc:creator>felipetavares</dc:creator>
      <dc:date>2016-06-09T22:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239090#M73649</link>
      <description>&lt;P&gt;Hello @burwell, sorry for the late answer, I was traveling and couldn't answer before.&lt;BR /&gt;
Well, my sources here are some jsons generated by some other softwares that I control.&lt;BR /&gt;
So, to fix this, we change the timestamp field at the json schema from string to long. For example:&lt;BR /&gt;
We had: &lt;BR /&gt;
timestamp: "276257257257265"&lt;BR /&gt;
Now we have:&lt;BR /&gt;
timestamp: 276257257257265&lt;BR /&gt;
I don't really know if this kind of change can be done on Splunk before the timestamp recognition phase, maybe @kschon could tell us &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 22:25:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239090#M73649</guid>
      <dc:creator>felipetavares</dc:creator>
      <dc:date>2016-06-09T22:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Hunk timestamp problem</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239091#M73650</link>
      <description>&lt;P&gt;I believe you can handle this case via a calculated field. For example, you could add this to props.conf:&lt;/P&gt;

&lt;P&gt;[]&lt;BR /&gt;
EVAL-_time = strptime(timestamp, "%s")&lt;/P&gt;

&lt;P&gt;However "%s" expects a 10-digit epoch time string, and it looks like you have more precision than that, so you would probably need to use substr too. Since you can change the generating schema, that's probably a lot simpler.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2016 00:11:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Hunk-timestamp-problem/m-p/239091#M73650</guid>
      <dc:creator>kschon_splunk</dc:creator>
      <dc:date>2016-06-10T00:11:31Z</dc:date>
    </item>
  </channel>
</rss>

