NRQL tag management

We’re trying to integrate Opsgenie with New Relic.
Opsgenie reads tags from incidents in order to open a Jira ticket, the problem we’re facing is that there are no tags binded to NRQL conditions. Is there a way to achieve this?
We either need to tag NRQL conditions or link the Synthetic entity to NRQL in order to pass tags to Opsgenie once an incident is open.

Thank you everyone.

Hi @giorgio.chiodini.ext

You can get tags bound to NRQL alert conditions so long as they are queryable (note that only Synthetic events have queryable tags in them currently). You do this by using a FACET clause on the tag. You can then include it in your Alert custom violation description so that it will come through in a notification.

Here’s an example

Let’s say you have a NRQL alert condition targeting SyntheticCheck. You have a tag, named foo, on the Synthetics monitors that you’re filtering to.

SELECT count(*) FROM SyntheticCheck WHERE monitorName IN ('monitor1','monitor2','monitor3') AND result = 'SUCCESS' FACET tags.foo

You can then include tag.tags.foo in your description field (as shown in the documentation linked above) so that you can get the value of the foo tag included in your alert notification, and thus on the OpsGenie-created Jira ticket.

I hope this helps!

2 Likes

Thank you very much for the answer Fidelicatessen! You solved my problem!!

Have a wonderful day.

Giorgio.