Alert for https certificate checks in Standard (preview) tests

fhtino 136 Reputation points

I'm using Application Insights availability tests, in particular Standard (preview) test. It allows you to do a proactive https certificate expiration test, 1/7/30/90/365 days before expiration. If the monitored site is down OR the certificate is near to expire, the availability test fails and, if you have set up an alert + action group, you receive an email. But the email does not show the reason of the failure, if it was a connection issue (site down) or a certificate near to expiration date issue.  (screenshot)


I also checked the data stored in availabilyResults table. For certificate failed checks, the message field contains a text like "Certificate will expire in XX day(s).". 
I understand that using Kusto  (e.g. availabilityResults | where message startswith "Certificate will expire")  I could create a custom query and create an alert on it but it's tricky, based on string comparison without guarantees that they don't change in future and costly (1.50 € per alert per month).

To summarize:

 - is there a way to customize the alert email to understand the real reason for the failure?

 - is there a way to create a Standard test that only checks for certificate expiration and does not raise an alarm in case of site down?  If possible, I would create 2 checks: one test for site up/down; another one for certificate lifetime check.   

Suggestion/improvement for the product team : 

  • in table availabilyResults, field customDimensions, add one or more fields with a clear failure reason. e.g.  CheckType="CertificateLifeTimeCheck"  ExpireInDays="96" CertificateExpiring="YES".  This does not solve the above issues but helps to create a better kusto query.


Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,938 questions
{count} votes