Aggregating two `count` metrics

I have two metrics pulled in from GitHub Pull Requests: # of Pull Requests (total document count) and the # of unique contributors (based on user_uuid).

I need to create a Metric where the first number is divided by the second number: #PRs/#Contributors

I've been racking my brain trying to figure this out. I tried creating a scripted field but I don't know how to get the # of documents from inside the script. I see Scripted Metrics Aggregation in the ES documentation but I am not sure how it can be visualized in Kibana.

I am using Kibana 6.8.6

Hi, welcome! This is a common request, but not currently supported: https://github.com/elastic/kibana/issues/4707

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