checkmk icon indicating copy to clipboard operation
checkmk copied to clipboard

Amazon SES Web API Integration

Open matthias1232 opened this issue 2 years ago • 3 comments

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: image image

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

matthias1232 avatar Oct 19 '23 22:10 matthias1232

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

github-actions[bot] avatar Oct 19 '23 22:10 github-actions[bot]

I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA.

matthias1232 avatar Oct 20 '23 10:10 matthias1232

recheck

matthias1232 avatar Oct 20 '23 10:10 matthias1232

Dear Checkmk Contributor! Unfortunately, we had to re-write our git-repo history, rendering your PR auto-closed. We will therefore rebase your PR onto the current master and reopen it again. Sorry for the inconvenience.

TimotheusBachinger avatar Jun 19 '24 08:06 TimotheusBachinger

Dear Contributor. Unfortunately, we learned that re-opening a PR which was force-rebased, is not possible (see https://github.com/isaacs/github/issues/361). Therefore we kindly ask you to create a new PR for your change. We apologize for the circumstances and will implement technical measures to prevent such incidents in the future.

TimotheusBachinger avatar Jun 19 '24 13:06 TimotheusBachinger