FACET elements are concatenated on email notifications

Hi community,

I’m working on a NRQL alert query to notify via email when a SSL certificate is about to expire. Everything is working fine. The thing is when I want to include the daysToExpiration attribute on the Custom Violation Description, the email will come with something like:

https://example.com_95 query result is < 100 on 'My Alert’

Where 95 is the value of daysToExpiration attribute. As you can see the link is broken because of the _95 at the end of the url, this is how I currently receive the emails.
My NRQL query is the following:

SELECT latest(DaysToExpiration) FROM SSLCertificate facet Url, DaysToExpiration

Is there a way I can get the DaysToExpiration value on the email notification without screwing the URL?

Thanks!

Hi @ecuevas1

Welcome to our Explorers Hub!!

I believe that you are already using the custom alert notification of your condition. Is that right?

If so I’m wondering how you are including the description on it?

As you can check here, you can include different custom/dynamic attributes to the description of the notification.

If you send me the link to the condition created, I’ll be happy to check it for you.

I hope this was helpful, should you have any questions or updates please do reach out.

Also if this helped resolve the issue please consider selecting the Solution ( How to Use the Official Solution Checkbox )option below this post.

thanks

Rodrigo

This text
https://example.com_95 query result is < 100 on 'My Alert’
Which happens to be the subject of the email being generated automatically by the Alert, there is no way I can customize that using custom/dynamic attributes.

This is how I’m setting the custom violation description, but there is no issue here:

SSL Certificate for domain {{tags.Url}} will expire in {{tags.DaysToExpiration}} days

The issue is with the subject on the email (or any place where the Url is referenced), it’s breaking the URL by attaching the DaysToExpiration to the URL itself, making it an invalid Url.

Instead of having:
https://example.com query result is < 100 on 'My Alert’

I’m getting:
https://example.com_95 query result is < 100 on 'My Alert’

Hi @ecuevas1

Thanks for the clarification!

Recently New Relic added the option to customize also the subject of the email sent.

For this, you need to be using the new Workflows (instead of the classic notification channels).

In the Workflow’s settings you can add your Email destination:

And include the custom subject and also the body of the notification:

Let me know if you have any doubts.


Also if this helped resolve the issue please consider selecting the :white_check_mark: Solution option below this post. Find more information here: How to Use the Official Solution Checkbox


thanks

Rodrigo

1 Like