We have configured Subscription to send us Email notification when certificates get expired. The subscription was working before, but suddenly it stopped working whenever a certificate gets expired.
Thanks for reaching out to Octopus support and I’m sorry to see you’re having this issue with your subscriptions. I just have a few questions to run by you to gather some more information.
Is there anything on your end that may have changed since this stopped working? Have you upgraded your Octopus instance or changed permissions on the ‘Technical’ team? Are you still getting other email notifications from your Octopus server? Also, which Octopus release are you currently running?
If you filter your audit data using the Certificate expiry events and Certificate replaced events do you see anything that has occurred recently? Depending on when your subscription is set to fire, you should find a corresponding task log that could have some useful information as well. When filtering your tasks you can select the ‘Process subscriptions’ task type to help narrow your selections down.
I will look into reproducing this issue on my end and I look forward to hearing back from you.
Is there anything on your end that may have changed since this stopped working?
Yes, we stopped getting Emails from Octopus Deploy when certificates gets expired.
Have you upgraded your Octopus instance or changed permissions on the ‘Technical’ team?
Yes, Octopus instance was upgraded to v2021.1 (Build 7738)
There was not permissions change on the ‘Technical’ team side. (I checked the Audit trail)
Are you still getting other email notifications from your Octopus server?
We normally uses Runbook in our project to send us Email completion and this one is working fine. We use a custom template to send Email via Runbook.
Which Octopus release are you currently running?
v2021.1 (Build 7738)
If you filter your audit data using the Certificate expiry events and Certificate replaced events do you see anything that has occurred recently?
I tried to look into the logs, but I couldn’t found anything related to the issue.
I’ve done some further testing on this and found that the problem seems to be due to the combination of events for the subscription.
When I separated Cert Expiry Events and Cert Replaced Event into two different Subscriptions the emails were then triggered and sent successfully.
e.g.
I wonder if the Certificate Replace Event condition may have been added to this subscription since the last time it successfully ran?
Also, do you know what version you were running prior to upgrading to v2021.1 (Build 7738)?
I have created a new Subscription and it seems to be working and sending us emails. But the thing is, Octopus send us the Certificate Expiry later on that day.
Certificate expired on Saturday, 22 January 2022 10:30 +04:00, but email was sent at Sat 1/22/2022 3:49 PM
That sounds correct, email notifications are not sent when the event occurs, but instead, they send at predetermined times, such as once a day for your configuration. They then group together any events that have occurred since the last email was sent.
Decreasing the email frequency to once every few hours may help, but if you need notifications as soon as the event occurs then you would have to configure the webhook notification instead and have somewhere for the notification to be sent and received.