I am trying to create a metric visualization that would show me a percentage. The issue that that the values are from 2 different indexes.
Let's say the first index is called 'phishing_emails_reported' and the second is 'phishing_emails_blocked'. I want to count the number of documents in 'phishing_emails_reported' (lets call this x) and count the number of docs in 'phishing_emails_blocked' (lets call this y). I want to return the value of
1 - x/y
I have tried using some bucket script aggregations to no avail.
Is there a way to have an aggregation fetch data from 2 different indexes or have 2 separate (sibling pipeline?) aggregations that would do this?
I believe that I can do this is timelion but I don't want a graph but rather a single percentage that I can but on a dashboard.