Getting details about the configured Synthetic monitors and their last response status


I am trying to view all my synthetic monitors and their last response. Use case is to know out of my configured monitors how many are failing and what are those. Since the count is large ( currently 100+ and going to be much more) I am looking for ways to pull them via NRQL.
I have this query

FROM SyntheticRequest SELECT URL, monitorName, responseCode, responseStatus

This is helping, however, I came to know for a simple browser scenario, this table will have all the dependent url’s for configured synthetic url ( for eg: will show up add urls, images downloaded urls etc) - which I do not need.
So I am kind of trying to join two tables to see if I can get something however, this isn’t helping either.
SELECT monitorName, type, URL, domain, responseCode, responseStatus FROM SyntheticCheck, SyntheticRequest

Seeking help to understand what could be the possible solution? Idea is to get a table which would display last poll time, monitor name , url, http code and response status ONLY for configured synthetics - not the dependents needed in case of simple browser or ping ones ( only one line for a monitor BTW).


can someone share thoughts?

Hi, @chandrashekar: You can get most of what you want from the SyntheticCheck event:

SELECT latest(timestamp), latest(result) FROM SyntheticCheck FACET monitorName LIMIT MAX

The challenge is getting URL and response code: a single Synthetic monitor can request multiple pages, so SyntheticCheck does not expose URL or response code attributes. Try this:

SELECT latest(timestamp), latest(URL), latest(responseCode), latest(result) FROM SyntheticCheck, SyntheticRequest WHERE contentCategory = 'html' AND pageref = 'page_0' FACET monitorName LIMIT MAX

Hello @chandrashekar -

Did @philweber’s suggestion get you what you need?

Thanks @philweber , missed responding to this thread, queries did help get details.
Is there any way to find out only live monitoring checks, as in only enabled ones?


1 Like

@chandrashekar Thank you for sharing the @philweber SyntheticCheck suggestions helped you out :slight_smile:

Hi, @chandrashekar: Only enabled monitors generate SyntheticCheck events. Unless you specify a longer SINCE clause, NRQL queries the past hour by default; if a monitor appears in the query result, it means it was enabled during the past hour.