log.debug("monitor",`No need to send cert notification for ${certInfo.certType} certificate "${subjectCN}" (${certInfo.daysRemaining} days valid) on ${targetDays} deadline.`);
}else{
log.debug("monitor",`call sendCertNotificationByTargetDays for ${targetDays} deadline on certificate ${subjectCN}.`);
letrow=awaitR.getRow("SELECT * FROM notification_sent_history WHERE type = ? AND monitor_id = ? AND days <= ?",[
"certificate",
@ -1270,7 +1280,7 @@ class Monitor extends BeanModel {
for(letnotificationofnotificationList){
try{
log.debug("monitor","Sending to "+notification.name);
awaitNotification.send(JSON.parse(notification.config),`[${this.name}][${this.url}] Certificate will expire in ${daysRemaining} days`);
awaitNotification.send(JSON.parse(notification.config),`[${this.name}][${this.url}] ${certType} certificate ${certCN} will be expired in ${daysRemaining} days`);
sent=true;
}catch(e){
log.error("monitor","Cannot send cert notification to "+notification.name);
@ -1285,9 +1295,6 @@ class Monitor extends BeanModel {
targetDays,
]);
}
}else{
log.debug("monitor","No notification, no need to send cert notification");