NASA-PDS / monitoring

Monitoring configuration for PDS EN system, currently based on AWS CloudWatch
Apache License 2.0
0 stars 0 forks source link

Setup email notifications for continuous monitoring #19

Closed jordanpadams closed 1 month ago

jordanpadams commented 1 month ago

💡 Description

⚔️ Parent Epic / Related Tickets

No response

nutjob4life commented 1 month ago

"Service" or "application" account request made; currently tracked in JPL JRA ICAM-18665

nutjob4life commented 1 month ago

The application account pdsen-orbit@jpl.nasa.gov has been created. The password needs to be set by a member of pdsen-ops by visiting dir/ai with a browser

The username and password should be then tested with JPL SMTP, such as with the Python SMTP client, as sometimes application accounts need further "poking/prodding" to get them to work with JPL SMTP.

Once confirmed, the secrets in https://github.com/NASA-PDS/PlanetPatrol/settings/secrets/actions will need to be updated as follows:

jordanpadams commented 1 month ago

@nutjob4life secrets updated... sorry I missed the testing part :-/

nutjob4life commented 1 month ago

@jordanpadams I got you fam, testing now

Okay, test doesn't work. The application account apparently lacks smtp permissions. I've filed INC0590116 to request that smtp access be given

(You'd think that'd be automatic given that the description of the account that they literally put in is: "Used for the Engineering Node of the PDS in order to authenticate with SMTP and other JPL resources" 🙄)

nutjob4life commented 1 month ago

Update: made argument with Kevin Reelfs (JPL Postmaster) on reasons to enable SMTP access for the account on 2024-07-17 … no response yet

nutjob4life commented 1 month ago

Update: Kevin Reelfs reached out to the appropriate department and enabled SMTP access for our "application" account.

Tested with the following script:

import smtplib

user = 'REDACTED@jpl.nasa.gov'
pwd = 'EVEN-MORE-REDACTED'

with smtplib.SMTP(host='ALSO-REDACTED-BUT-EASILY-GUESSED.jpl.nasa.gov', port=587) as s:
    s.starttls()
    s.login(user, pwd)

Now that they work I also updated the secrets in PlanetPatrol.