Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for non-UTC indexes #1163

Merged
merged 1 commit into from
Apr 28, 2014
Merged

Workaround for non-UTC indexes #1163

merged 1 commit into from
Apr 28, 2014

Conversation

lark
Copy link

@lark lark commented Apr 19, 2014

Indexes of elasticsearch are supposed to be in UTC, but at least, rsyslog
can only use local time to generate index name.

Kibana first finds indexes to query based on UTC time. So for east timezone,
there are a few hours, kibana will miss new created index(es) and no new data
is displayed during these hours.

This patch workarounds this issue. In most cases, there should be no indexes
for future time, so this just works without any harm. Even if indexes for
future time do exist, the real search query will limit time range before now.

Indexes of elasticsearch are supposed to be in UTC, but at least, rsyslog
can only use local time to generate index name.

Kibana first finds indexes to query based on UTC time. So for east timezone,
there are a few hours, kibana will miss new created index(es) and no new data
is displayed during these hours.

This patch workarounds this issue. In most cases, there should be no indexes
for future time, so this just works without any harm. Even if indexes for
future time do exist, the real search query will limit time range before now.
@rashidkpc
Copy link
Contributor

This seems like a reasonable workaround given the minimal overhead. Can you make sure you've signed the CLA?

@lark
Copy link
Author

lark commented Apr 24, 2014

Yes, I have signed CLA.

@rashidkpc rashidkpc merged commit 11b26d4 into elastic:master Apr 28, 2014
rashidkpc pushed a commit to rashidkpc/kibana that referenced this pull request Apr 28, 2014
… regularly grabbing empty data sets causes some visual oddities
@lark
Copy link
Author

lark commented Apr 29, 2014

I see. When search in old time range, the +12 adjustment will lead to extra existed indexes being hit, that will introduce noticeable overhead. But I am not sure what "grabbing empty data sets causes some visual oddities" means, can you elaborate on this more?

I will rework the patch. Sorry for my unthoughtfulness.

@rashidkpc
Copy link
Contributor

On the table panel, the entire table will go blank since the first reply from the server contains no hits. The table will only be populated by the 2nd request. On dashboards with a lot of panels, this ends up being a lot of extra http calls. I'm not entirely sure of a good way around that. It probably wouldn't happen often in production since the "in the future" index wouldn't usually exist, but if it does, it causes issues.

@rashidkpc rashidkpc removed the 3.1.0 label Apr 29, 2014
@lark
Copy link
Author

lark commented Apr 29, 2014

The crux of the problem is that we don't know what timezone the index name generated in. If we know it, we only offset with proper value (e.g minus for western timezone).

A hack is naming index like [prefix_Z+0000-]YYYY.MM.DD, which provides timezhone information. Kibana can respect this convention.

How about this idea?

@lark
Copy link
Author

lark commented Apr 29, 2014

Ok, I did simple test. Index name must be in lower case, so it's [prefix_z+0000-]YYYY.MM.DD.

In rsyslogd side, '+' may be replaced with '%2b', I am not sure A.T.M.

mrdavidlaing added a commit to cityindex/kibana that referenced this pull request Jun 6, 2014
…to_v3.1.0

* commit 'c19105cf3f2dbefe7aa41caebca5bcf40efff3b7': (51 commits)
  Fixed spurious version too low message when elasticsearch is unreachable
  Update module.js
  fixed typo preventing filters from being applied to topN queries
  Removing console.log message
  Remove apply, update version to 3.1.0
  Add panel height params back in to fix column panel sizing. Closes elastic#1146
  Closes elastic#1206. Fix share url in firefox
  Fix box-sizing in firefox, fix spinner pushing down panel-extra-container, closes elastic#1218
  Fix column panel after 430d7fa.
  Add jsonpath to license file
  Reverting elastic#1163, the overhead is larger than I anticipated and regularly grabbing empty data sets causes some visual oddities
  Add margin to bottom of error
  Add ignore_unmapped to sorts, closes elastic#1153
  Simplify docs, add tooltip, clean up editor
  Use a field filter instead of terms filter so that analysis is done on the value. Closes elastic#1166. Closes elastic#1142
  Send render whenever window size changes or a panel is resized
  Simplify kibanaPanel directive, fix css that stopped overflow:scroll from working on the table panel
  Fix for possibility of partial spans
  remove commented out less
  Add drag to resize panel widths. Closes elastic#329
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants