Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Code implements sending Mails with the Amazon SES WEB API
Mails from CheckMK can be sent directly via https request through the Amazom Simple Email Service.
To get it working the following python libraries need to be integrated in checkmk:
botocore
boto3
Screenshots:


Notify Log
2023-10-20 00:01:11,719 [20] [cmk.base.notify] ---------------------------------------------------------------------- 2023-10-20 00:01:11,719 [20] [cmk.base.notify] Got raw notification (localhost) context with 44 variables 2023-10-20 00:01:11,720 [20] [cmk.base.notify] Global rule 'Notify all contacts of a host/service via HTML email'... 2023-10-20 00:01:11,720 [20] [cmk.base.notify] -> matches! 2023-10-20 00:01:11,720 [20] [cmk.base.notify] - adding notification of cmkadmin via mail 2023-10-20 00:01:11,720 [20] [cmk.base.notify] Executing 1 notifications: 2023-10-20 00:01:11,720 [20] [cmk.base.notify] * notifying cmkadmin via mail, parameters: from, amazonses, graphs_per_notification, notifications_with_graphs, bulk: no 2023-10-20 00:01:11,720 [20] [cmk.base.notify] Creating spoolfile: /omd/sites/monitoring/var/check_mk/notify/spool/c4fb8568-7be0-41d1-af8a-1677a990f64f 2023-10-20 00:01:15,198 [20] [cmk.base.notify] ---------------------------------------------------------------------- 2023-10-20 00:01:15,198 [20] [cmk.base.notify] Got spool file c4fb8568 (localhost) for local delivery via mail 2023-10-20 00:01:15,198 [20] [cmk.utils.notify] sending command LOG;HOST NOTIFICATION: cmkadmin;localhost;UP;mail;Packet received via smart PING 2023-10-20 00:01:15,199 [20] [cmk.base.notify] executing /omd/sites/monitoring/share/check_mk/notifications/mail 2023-10-20 00:01:15,776 [20] [cmk.base.notify] Output: Email sent! Message ID: 0107018b49f50581-7fe00b23-93ea-4d31-a711-7ebaa228d305-000000 | Used Configuration Set: XXX| Used AWS Region: eu-central-1 2023-10-20 00:01:20,190 [20] [cmk.base.notify] ---------------------------------------------------------------------- 2023-10-20 00:01:20,190 [20] [cmk.base.notify] Got spool file ebda51e3 (localhost) for local delivery via mail 2023-10-20 00:01:20,190 [20] [cmk.utils.notify] sending command LOG;HOST NOTIFICATION: cmkadmin;localhost;UP;mail;Packet received via smart PING 2023-10-20 00:01:20,190 [20] [cmk.base.notify] executing /omd/sites/monitoring/share/check_mk/notifications/mail 2023-10-20 00:01:20,745 [20] [cmk.base.notify] Output: Email sent! Message ID: 0107018b49f5190e-74f715c7-869c-4b80-8287-2d288bc23622-000000 | Used Configuration Set: XXX| Used AWS Region: eu-central