I am researching whether New Relic is able to satisfy an alerting use case for my team. In my case, I want to send custom events (either via REST API or Ruby agent, irrelevant detail) to New Relic and have an alert created based on an NRQL query. Specifically, I want a nightly cron job to fire a New Relic custom event whenever it succeeds, and I am alerted when an gap of > 24 hours is detected between the last two successful custom events.
I want to know if it is possible to write an NRQL query that only reports specific custom events that match my
eventType value. From this page regarding setting alerts from NRQL queries, I know that I need to specify an
Event relation to query from. But, it is not clear to me what value I need to sub in as the
Event. Is this value equal to the
eventType that I set in the customer event sent via the API? Or do I need to instead query from a different relation and have the
eventType be something that I apply a
WHERE clause on?
My apologies if this seems like a noob NRQL question, but this is the first time I am working with NRQL and the documentation does not provide any example of querying for custom events with NRQL. Moreover, if anyone can think of a solution that’s better suited to the problem I’m trying to solve (alert based on > 24 hour time gap between 2 custom events), then I would love to hear and explore that.