Merge pull request #3312 from jtschladen/fix-expiration-summary
Expiration summary email fixes
This commit is contained in:
commit
8a63b175e3
|
@ -85,11 +85,11 @@ def security_expiration_summary(exclude):
|
||||||
status = FAILURE_METRIC_STATUS
|
status = FAILURE_METRIC_STATUS
|
||||||
try:
|
try:
|
||||||
print("Starting to notify security team about expiring certificates!")
|
print("Starting to notify security team about expiring certificates!")
|
||||||
success, failed = send_security_expiration_summary(exclude)
|
success = send_security_expiration_summary(exclude)
|
||||||
print(
|
print(
|
||||||
"Finished notifying security team about expiring certificates! "
|
f"Finished notifying security team about expiring certificates! Success: {success}"
|
||||||
f"Sent: {success} Failed: {failed}"
|
|
||||||
)
|
)
|
||||||
|
if success:
|
||||||
status = SUCCESS_METRIC_STATUS
|
status = SUCCESS_METRIC_STATUS
|
||||||
except Exception:
|
except Exception:
|
||||||
sentry.captureException()
|
sentry.captureException()
|
||||||
|
|
|
@ -77,7 +77,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-family:Roboto-Regular,Helvetica,Arial,sans-serif;font-size:13px;color:#202020;line-height:1.5">
|
<td style="font-family:Roboto-Regular,Helvetica,Arial,sans-serif;font-size:13px;color:#202020;line-height:1.5">
|
||||||
<br>This is a summary of all certificates expiring soon.
|
<br>This is a summary of all certificates expiring soon.
|
||||||
Only certificates matching the configured expiration intervals are included here.
|
|
||||||
Certificates with notifications disabled have been omitted.
|
Certificates with notifications disabled have been omitted.
|
||||||
<table border="0" cellspacing="0" cellpadding="0" style="margin-top:12px;margin-bottom:48px">
|
<table border="0" cellspacing="0" cellpadding="0" style="margin-top:12px;margin-bottom:48px">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -87,7 +86,7 @@
|
||||||
<td width="16px"></td>
|
<td width="16px"></td>
|
||||||
<td style="line-height:1.2">
|
<td style="line-height:1.2">
|
||||||
<span style="font-family:Roboto-Regular,Helvetica,Arial,sans-serif;font-size:24px;color:#202020">
|
<span style="font-family:Roboto-Regular,Helvetica,Arial,sans-serif;font-size:24px;color:#202020">
|
||||||
<br>Expiring in {{ interval_and_certs["interval"] }} days<br>
|
<br>Expiring in {{ interval_and_certs["interval"] + 1 }} days<br>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in New Issue