8dc78573ff951bb31c0303a7f62ab2683cbdbac9
wiki/info/landscape/olympic-setup.md
| ... | ... | @@ -271,6 +271,23 @@ The backup from sap-p1-1 to sap-p1-2 runs at 01:00 each day, and the backup from |
| 271 | 271 | |
| 272 | 272 | ### Monitoring and e-Mail Alerting |
| 273 | 273 | |
| 274 | +To be able to use ``sendmail`` to send notifications via email it needs to be installed and configured to use the AWS SES as smtp relay: |
|
| 275 | +``` |
|
| 276 | +sudo apt install sendmail |
|
| 277 | +``` |
|
| 278 | + |
|
| 279 | +Follow the instructions on [https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-sendmail.html](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-sendmail.html) with one exception, the content that needs to be added to ``sendmail.mc`` looks like: |
|
| 280 | +``` |
|
| 281 | +define(`SMART_HOST', `email-smtp.eu-west-1.amazonaws.com')dnl |
|
| 282 | +define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl |
|
| 283 | +define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl |
|
| 284 | +FEATURE(`authinfo', `hash -o /etc/mail/authinfo.db')dnl |
|
| 285 | +MASQUERADE_AS(`sapsailing.com')dnl |
|
| 286 | +FEATURE(masquerade_envelope)dnl |
|
| 287 | +FEATURE(masquerade_entire_domain)dnl |
|
| 288 | +``` |
|
| 289 | +The authentication details can be fetched from the content of ``/root/mail.properties`` of any running sailing EC2 instance. |
|
| 290 | + |
|
| 274 | 291 | Both laptops, ``sap-p1-1`` and ``sap-p1-2`` have monitoring scripts from the git folder ``configuration/on-site-scripts`` linked to ``/usr/local/bin``. These in particular include ``monitor-autossh-tunnels`` and ``monitor-mongo-replica-set-delay`` as well as a ``notify-operators`` script which contains the list of e-mail addresses to notify in case an alert occurs. |
| 275 | 292 | |
| 276 | 293 | The ``monitor-autossh-tunnels`` script checks all running ``autossh`` processes and looks for their corresponding ``ssh`` child processes. If any of them is missing, an alert is sent using ``notify-operators``. |