diff --git a/lemur/notifications/cli.py b/lemur/notifications/cli.py index d86028c0..042a54fb 100644 --- a/lemur/notifications/cli.py +++ b/lemur/notifications/cli.py @@ -85,12 +85,12 @@ def security_expiration_summary(exclude): status = FAILURE_METRIC_STATUS try: print("Starting to notify security team about expiring certificates!") - success, failed = send_security_expiration_summary(exclude) + success = send_security_expiration_summary(exclude) print( - "Finished notifying security team about expiring certificates! " - f"Sent: {success} Failed: {failed}" + f"Finished notifying security team about expiring certificates! Success: {success}" ) - status = SUCCESS_METRIC_STATUS + if success: + status = SUCCESS_METRIC_STATUS except Exception: sentry.captureException() diff --git a/lemur/plugins/lemur_email/templates/expiration_summary.html b/lemur/plugins/lemur_email/templates/expiration_summary.html index d2e98196..ca6b3c6a 100644 --- a/lemur/plugins/lemur_email/templates/expiration_summary.html +++ b/lemur/plugins/lemur_email/templates/expiration_summary.html @@ -77,7 +77,6 @@
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. @@ -87,7 +86,7 @@
-
Expiring in {{ interval_and_certs["interval"] }} days
+
Expiring in {{ interval_and_certs["interval"] + 1 }} days