I'm trying to use Visual Builder to compute a ratio, on a given time period.
I use the log sample data (https://download.elastic.co/demos/kibana/gettingstarted/logs.jsonl.gz).
I want to display the ratio of 404 error code among all request, in the selected period.
Here's what I do:
And I get the following graphic:
but when looking the metric tab:
What's wrong in what I did?
Markdown only show values for the last bucket in the date histogram. In your example, the last bucket has a value of zero. There is a lot of user confusion about where the values for
Metric are getting pulled from. There is an open Pull Request that adds a new setting that controls the time range used for matching documents.
If you want to display the average filter ratio for the entire timerange, you will have to use a parent aggregation to keep a moving average. Then the last bucket will contain the metric that you are expecting.
Thank you for your answer. I figured out something like that but used the last « average » in the list. What is the difference with the moving average ?
Bucket aggregations divide documents in buckets.
Metric aggregations calculate a value for all of the documents in a single bucket
Pipeline aggregations work on the outputs produced from other aggregations rather than raw documents.
average. Metric aggregation that computes the average for all documents in a single bucket.
Moving average pipeline aggregation that computes the moving average of the output of another Metric aggregation .
average bucket A sibling pipeline aggregation which calculates the (mean) average value of a specified metric in a sibling aggregation
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.