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

Get link to result #1100

Closed
wants to merge 11 commits into from
Closed

Get link to result #1100

wants to merge 11 commits into from

Conversation

awheeler
Copy link

This implements the feature request #717.
Additionally, it adds consistent URL arg support to all dashboards.

@rashidkpc
Copy link
Contributor

Given that we know what index the event is in, and what the event's ID is, there's 2 cleaner ways to do this:

  1. Simply link to the event in Elasticsearch
  2. Create a new template dashboard with 1 row, and a single table panel. Allow it to have 2 URL args, id and index. There is no need for a time filter if all we're trying todo is link to a single event.

@awheeler
Copy link
Author

I think there's value in being able to share a link in the context within which it was seen, so using the same dashboard that was used to find it makes sense.
For the time filter, I agree, but I'm not sure how to do that, since passing the index as an arg for a day other than today doesn't seem to work for me.
On a side note, I seem to have been caught by a caching issue, and I need to fix a bug that I wasn't seeing before.

@TheCrockett
Copy link

This is awesome @awheeler

We have been 'hacking' this in on our own for a while now. This feature is invaluable to our developers and I appreciate your effort here.

@samdoran
Copy link

samdoran commented Apr 3, 2014

I think Alex has a good point: being able to send a link to an event and have it display on the same dashboard the send was seeing when she/he sent it is the best experience.

Linking to the event directly in Elasticsearch works fine for those of us comfortable visually parsing JSON, but these events will be seen by a wide audience and not all of them comfortable with raw text in a browser window (or a shell for that matter).

Generating a new dashboard just for that single event is a better solution, however it presents of problem that the recipient of the link will see something different than the sender. Yes, it's only one event so there won't be much displayed on the page, but for the sake of consistency, it would be nice to have the link to a single event show on the same dashboard the send is seeing and not a generic one.

@rashidkpc
Copy link
Contributor

There may be value in it, though given it would only show a single event, thus none of the charts would really have much on them, I don't quite see it. I'm strongly against the addition of hardcoded query parameters here, given that they would break many users custom dashboards.

The current implementation also forces the first filter to be a time filter, though doesn't actually check if it is before setting to/from keys on it. It also hard codes the time field to be @timestamp. It also assumes that the data being shown has a time field at all, which many do not.

I could see this implemented as a scripted or templated dashboard that we ship with Kibana, but attempting to hardcore a bunch of parameters to serve this use has far too many side effects.

@awheeler
Copy link
Author

awheeler commented Apr 3, 2014

Can you show me some example code where an index plus a query is sufficient to display an event? In looking at logstash.js, I have passed index on the command-line, but this doesn't seem to actually set the interval as well, so I get no events displayed, but perhaps I'm doing it wrong? -
index.html#/dashboard/script/logstash.js?index=logstash-2014.04.01
this shows no events, and the current time interval is set to day ago -- so I think index is working, but is defaulting to a timerange not in the index.
I would be happy to simplify the code to just use index if I could.

@@ -296,6 +296,20 @@ function (angular, $, kbn, _, config, moment, Modernizr) {

var renderTemplate = function(json,params) {
var _r;
var _json;
if(!json.match('ARGS\.(to|from|style|query)')) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't make changes to dashboards that are already doing things with to/from/style/query.

@awheeler
Copy link
Author

awheeler commented Apr 3, 2014

My intent was to not break pre-existing dashboards, but since I don't have access to any other than stock ones, I may be making erroneous assumptions. My original submission did break them, but that should no longer be the case.

@awheeler
Copy link
Author

awheeler commented Apr 3, 2014

In talking to Rashid, it appears that there are several issues here:

  1. Not all users of Kibana are looking at time-oriented data, such as user profiles. So the share link would need to work with that kind of data as well.
  2. Data that isn't time oriented might be better displayed on a specific dashboard designed for a single event of that kind.
  3. It's possible that the URL args I am using could conflict with other URL args being used.
    Rashid, does that about cover it?

@awheeler
Copy link
Author

I'm going to re-architect my repo branch names to better support multiple pull requests against this repo, so I'll be closing this pull request, and then issuing a new one.
There seems to be no way to rename a branch.

@awheeler awheeler closed this Apr 17, 2014
@awheeler awheeler mentioned this pull request Apr 17, 2014
w33ble pushed a commit to w33ble/kibana that referenced this pull request Sep 13, 2018
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.

4 participants