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

Support for statistic events handler for Import CSV job state and report #7680

Closed
bahaaldine opened this issue Jul 8, 2016 · 2 comments
Closed
Labels

Comments

@bahaaldine
Copy link

bahaaldine commented Jul 8, 2016

I've honestly not checked in the code if this exists, so if it does, please close this issue.

Just bringing an idea that I've implement in an import data plugin: would be great to persist some of the fundamental statistics related to the import job.

This is how I've done that:

  • I've simply used a stat events handler listening for stat events when the plugins is loaded:

https://github.com/elastic/kibastash/blob/master/index.js#L62

  • I'm emitting the stats when needed here:

https://github.com/elastic/kibastash/blob/master/server/lib/update_job_remaining_line.js#L15

  • Persisting the event here:

https://github.com/elastic/kibastash/blob/master/server/lib/handle_stats_event.js

So I'm able to keep an an history if the users want it, and render standard related kibana reports.

On the client side, I'm using susie (https://github.com/mtharrison/susie) :

https://github.com/elastic/kibastash/blob/master/server/routes/api.js#L26

to emit the event to the browser:

https://github.com/elastic/kibastash/blob/master/server/routes/api.js#L106

So the browser can render a progress bar.

@Bargs
Copy link
Contributor

Bargs commented Jul 8, 2016

We take a similar approach now. The import request gets a chunked response that returns indexing results as they become available (see #6844 for more info on that). I just haven't taken advantage of it on the UI side yet.

Someday I'd like to add support for Server Sent Events if IE ever adds support.

@epixa
Copy link
Contributor

epixa commented Dec 26, 2016

I'm going to close this since CSV upload was pulled. We can always refer back to this issue if/when we revisit the feature.

@epixa epixa closed this as completed Dec 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants