The query does not bring me the correct information

I need to generate a query to put in a graph, either a counter type where it indicates which monitors are currently alerted. What is being presented live and not a history, elaborate this query but what it does is bring me all the history

SELECT count(*) FROM SyntheticCheck WHERE result = ‘FAILED’

Try to filter for example 10 minutes, but it still brings me wrong data, since it brings me everything that was alerted during those 10 minutes.
So I need to get a counter of all monitors in Syntetic that are alertedTry to filter for example 10 minutes, but it still brings me wrong data, since it brings me everything that was alerted during those 10 minutes.
So I need to get a counter of all monitors in Synthetics that are alerted

This gets you close. The issue to understand is that this will give you the mount of monitors that have failed in the period you set, but wont tell you if the latest check failed.

SELECT uniqueCount(monitorId) as SyntheticMonitors from SyntheticCheck where result = 'FAILED' since 15 minutes ago

Shortening the period help to a point. If our check interval is wider than the time period of the NRQL you may miss failures.

@jnavarroso Following up to see if 6MM suggestions ^^ helped you resolve this issue?