Need to visualize consistently failing tests

I am trying to calculate consistently failing tests over the past 48 hours. For my index I have test results with two significant fields: test_identifier (string) and test_result_status (pass or fail).
I would like to display the count of tests that have passed and not failed, and also the list.

Using the Dev Tools Console I can create an Elasticsearch query to accomplish this. I am able to create filter aggregations to count the total pass and total fail, and use a bucket_selector script like this: params.pass_count == 0 && params.fail_count > 1. This results in buckets for each test that fails so I have the list and the count of consistently failing tests.

However, I am not able to visualize this bucket list or count. I cannot get the Metric and TSVB visualizations to accomplish this. How can I get this ElasticSearch result displayed in a Metric or other visualization?

Hi, welcome to the forums. Your use case makes sense, but it's not well supported in most of the Kibana tools for reasons that are mostly historical, but also because we haven't come up with a simple and elegant way to do it. Until we come up with a better way, here are your two options:

  1. Change the format of the data you have, for example by using a continuous transform on your data to pre-aggregate it in the format you need for visualizing

  2. Create a fully custom Vega visualization. This lets you write your ES query, but is more complex than it needs to be.

In the medium term we are aiming to solve your problem and others like it, but for now those options are what you have.

Hi. Thanks for the information. I'll stop banging my head on the wall now :slight_smile:
I'll start looking into Vega.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.