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

Add percentiles bucket pipeline aggregation #20087

Closed
Tracked by #179200
joejuzl opened this issue Jun 20, 2018 · 2 comments
Closed
Tracked by #179200

Add percentiles bucket pipeline aggregation #20087

joejuzl opened this issue Jun 20, 2018 · 2 comments
Labels
enhancement New value added to drive a business result Feature:Aggregations Aggregation infrastructure (AggConfig, esaggs, ...) Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@joejuzl
Copy link

joejuzl commented Jun 20, 2018

Describe the feature:
It would be great to be able to use the percentiles_bucket aggregation in a metrics visualisation.

Describe a specific use case for the feature:
I store events in elasticsearch. Each event has a user and a timestamp.
I have a scripted field event_delay which calculates the time difference between now and the timestamp.
I can find the min event_delay, let's call it diary_delay, for a single user easily. Using the min aggregation.
However I want to the percentiles of diary_delay aggregated over all users.
In elasticsearch this would be done like so:

{
  "size": 0,
  "aggs": {
    "diary_delay_per_user": {
      "terms": {
        "field": "user.keyword"
      },
      "aggs": {
        "diary_delay": {
          "min": {
            "script" : {
              "lang": "painless",
              "source": "(new Date().getTime() - doc['end_timestamp'].value.getMillis())/3600000"
            }
          }
        }
      }
    },
    "avg_diary_delay": {
      "avg_bucket": {
        "buckets_path": "diary_delay_per_user>diary_delay"
      }
    },
    "percentiles_diary_delay": {
      "percentiles_bucket": {
        "buckets_path": "diary_delay_per_user>diary_delay"
      }
    }
  }
}

However without percentiles_diary_delay I can't replicate this in kibana. There may be an alternative that I am not aware of.

Thanks!

@lukasolson lukasolson added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) triage_needed labels Jun 20, 2018
@timroes timroes added Feature:Aggregations Aggregation infrastructure (AggConfig, esaggs, ...) enhancement New value added to drive a business result and removed triage_needed labels Jun 20, 2018
@timroes timroes changed the title percentiles_bucket aggregation in Metrics visualisation Add percentiles bucket pipeline aggregation Jun 20, 2018
@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Visualizations Generic visualization features (in case no more specific feature label is available) labels Sep 16, 2018
@TraderApophis
Copy link

+1

@timductive
Copy link
Member

Closing this because it's not planned to be resolved in the foreseeable future. It will be tracked in our Icebox and will be re-opened if our priorities change. Feel free to re-open if you think it should be melted sooner.

@timductive timductive closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Aggregations Aggregation infrastructure (AggConfig, esaggs, ...) Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

5 participants