Dynatrace Managed Q&A
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Looking to upgrade from Dynatrace Managed to SaaS? See how

i want to monitor certificate expiry date ( not ssl )

superuser786
Visitor

i have https endpoint and the output will be like below, i want to configure dynatrace alert if expiry date 15days before.. is it possible in dynatrace and how to configure?

 

Output:

{
"status": "UP",
"details": {
"AB_TEST": {
"issuer": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"subject": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"serial": xxxxxxxxxx,
"validity": {
"from": "2025-01-28T11:39:52",   -------> i want to configure this alert before certificate expiry
"to": "2026-02-27T11:39:51"
},

8 REPLIES 8

superuser786
Visitor

i am using managed dynatrace

still should be able to use Classic Synthetics

Kenny_Gillette_0-1765207509136.png

 

Dynatrace Certified Professional

i am aware that synthetic for only SSL, but my query is how to monitor synthetic with the output of the endpoint that i attached above

Hi,

You can use Synthetic using custom Javascript:

  • Make GET request.
  • Extract information you want for JSON.
  • Compare date with actual date.
  • Create event failure if lower than 15 days.

Best regards 

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

You can explore Synthetic monitoring. You can create a Synthetic monitor and alert base on certificate expiration.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

sujit_k_singh
Advisor

Hello,

Synthetic monitoring is the best solution in this context, i have used this and works perfectly.

Thanks,

Tijust

Dynatrace Professional Certified

i cant achieve using synthetic why because its only for SSL certificate validations, can you share how do you achieve the api output text to monitor and send the alert? i have attached my code out put above chat

ok, understood, To achieve this, you can create an HTTP Synthetic Monitor in Dynatrace. Start by navigating to Synthetic → Create HTTP monitor, and enter the URL of your endpoint that returns the JSON with certificate details. Once the monitor is set up, add a JavaScript validation step after the request. In this step, you’ll parse the JSON response and calculate how many days remain until the expiry date.
 
If the endpoint data is coming in logs instead of being accessible via a direct URL, then a Synthetic monitor won’t work because it needs an HTTP endpoint to call. In that case If the JSON snippet appears in your logs instead of an API endpoint, you can leverage Log Monitoring. The idea is to extract the expiry date from the log and turn it into a metric for alerting. First, create a log processing rule to capture the validity.to field as a custom attribute. Next, convert that date into a timestamp and calculate the difference from the current time. Once you have this value, push it as a custom metric (like, days_until_expiry). Finally, set up a custom alerting rule that triggers when days_until_expiry is less than 15
Dynatrace Professional Certified

Featured Posts